-
Notifications
You must be signed in to change notification settings - Fork 10
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
Trying to encryption/decryption data using NodeJs Fails #40
Comments
To test this, I'll need the values for "secureKey", "data", and "salt". Additionally, what cryptographic library are you using for NodeJS? |
I am using the inbuilt library in NodeJs Here is the code, with the dummy key, salt & data, which works fine on app but on node I am getting an error saying the
|
Your key and iv are using base64 encoding. An issue could be that NodeJS expects a hex-encoded key or something. |
Whoops didnt mean to close this |
Actually NodeJs has an option for using Base64 also if convert the key to hex the key length is still wrong |
I don't know what to tell you. 'n7oAAnS6oSuo9XEExIM2ZfsIw5O1nCuT7JmlEAe+ykQ=' is a 32 byte key encoded using base64. What length key does nodeJS want? It should only need a 32 byte key. |
Hey, I guess the way I am generating the key could be wrong on my part.
I then used that key for
I am just confused why steelcrypt AesCrypt accepted the secureKey if its not 32 byte And you are right NodeJs needs a 32 byte too but it doesn't accept the key above. |
A NodeJs working example similar to the one you've made for dart would be really useful for everyone. It has all the same crypto features which have been standardized and interoperability is really key as a lot of backend software use NodeJs or Python. |
for now we decide to stick to
It works now in both our nodejs backend and dart |
I couldn't work out the parameters to make |
Okay. I will investigate the discrepancy between this library and node. |
Thanks that would be super helpful |
Any update on this? |
Hi I am trying to replicate the same encryption/decryption that is done using Steel Crypt on NodeJs, the same data that is being encrypted on device needs to be decrypted on our server. But using the key to decrypt the data doesn't seem to work.
this is encryption standard I am using.
The text was updated successfully, but these errors were encountered: