0down votefavorite 
<http://stackoverflow.com/questions/39363281/node-crypto-aes-decrypt-issue#>

We have been provided with an encrypted text and a passphrase. Along with 
that they have informed that the text has been encrypted using AES-128

Encrypted Text - 
5vCGQXtdj7GZtwwhwVOquSyR/qvs95ojBsmOf9DX6T31Y2yTIvjXYHf6gd8icDaY 
Passphrase/password - FX4DqkZCb4KI6BWF

Expected O/P - e23f95c7-79c2-4c6f-9408-411bcfaf3665

Now when I decrypt online from http://aesencryption.net/ It does generate 
the Guid, However, it does not work with any other online tool.

Also, I need to implement the same in Node Js. I have used the code 
mentioned below, but still that does not work and thus generate unwanted 
data.


var aesDecrypt = (text, password, bit) => {var crypto = require('crypto');var 
decipher = crypto.createDecipher('aes-' + bit + '-cbc', password);
decipher.setAutoPadding(false);var plaintext = decipher.update(text, 'base64', 
'utf8');var token = plaintext.toString();return token;

}


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/924759e2-fec0-4fd8-9efc-8d480d9c5aa5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to