-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Every time New Encrypted string Generate using AES #151
Comments
maybe you can use sha or smth else? |
As @ayazzali already mentioned, you get different results each time because AES utilizes something called "salt" to make the encryption more secure. This salt is different every time you encrypt something. Using SHA or any other hashing method will most likely not be the solution you're looking for since you cannot decrypt a hash. So I'm afraid you have to change the way you use AES cause you cannot change the way it works :/ |
You can use AES-CBC and use a derivative of the Explicit Initialization Vector technique by specifying a fixed IV. But by having fixed result for a same input you loose in security. |
Use |
Thanks @szhero |
@sanjayV... I'm also using this technique in javascript and facing the same issue. I'm not getting the same encrypted key for the same set of input. Please help me to resolve this. Below is my code used to encrypt the string. var key = '55a51621a6648525'; |
Hi @sachsharma
|
Thanks @sanjayV 👍 Any idea of getting the 64 bit or 128 bit or 256 bit length output based on the requirement. I have searched alot but not getting good idea. |
hey the deycrypt is not working |
This solution works for some inputs but not all. |
THANK YOU BHAI |
Hello,
I'm using
crypto-js
library withNode.js
Encryption/Decryption `(String/ Stringify object).Issue is that when i try to Encrypt any string then every moment i get different different encrypted strings But when i Decrypt this all the strings then i got the same plain text Which i use for encrypt.
I want to do like same Encrypted string every moment.
Here my node and npm version
My code is like this,
I want to do like that every moment i got same encrypted string for same plain text.
Please help me i'm in stuck.
Thank you in advance :)
The text was updated successfully, but these errors were encountered: