-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"CTR" mode is not same as "aes-256-ctr" in crypto library. #73
Comments
I see that you are relying on the symmetric nature of the algorithm. Also, per the examples, sometimes a conversion to a hex string helped me when wrapping the Node API. |
So.... it is possable to decrypt it using crypto? What should I do? |
That's the fn I use for crypto in my library. A simple symmetric wrapper around the native library. Node's native lib is finicky. It took me some time to figure out. I haven't yet built a bridge to the browser, but it's on my TODO list which is how I landed here. I'm interested in the same problem you're solving in other words :) |
IIRC base64 may be what Node prefers but I don't exactly recall. There may also be padding-related issues since the aes-js library seems to indicate fragility around fixed length keys. |
I have some file which encrypted by aes-js CTR mode.
Now I want to decrypt them using library "crypto". I think ctr in crypto should be "aes-256-ctr", but I can't decrypt them.
Here 's my demo code:(I use node v8.11.2)
The text was updated successfully, but these errors were encountered: