Click here to Skip to main content
15,070,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm using Node.js to encrypt a validation string using 'AES-256-CBC' in crypto. I'd eventually like to decrypt that string using C# System.Security.Cryptography.Aes class.

How do I find the corresponding c# decryption settings?

For testing, I'm encrypting a string in node.js, and encrypting that same string in c# and comparing my cipher texts.

As you can see below, they differ by only 1 character.

Here's the node.js cipher text:

Here's the c# cipher text:

What I have tried:

In both node.js and c#, I'm encrypting with a 32-byte key and a 16-byte IV.
Atlapure Ambrish 25-Oct-17 3:33am
I am sure you have referred these articles, but still wanted to point those out..
SBGTrading 25-Oct-17 12:53pm
Thanks for the solved my problem.
Atlapure Ambrish 26-Oct-17 10:52am
no problem, it's my pleasure!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900