I am looking for way to encrypt string in C# and to decrypt it using JavaScript. JavaScript in this case is a scripting language for internal system, so I should not worry about people accessing private key/password which will be required for decryption.
Searching online for solution it seems that AES encryption should do the trick. I’ve looked into slowAES and RijndaelManaged solution, but had no luck getting it to work.
I’ve used C# code which Cheeso provided and received identical cipher text. But when I’ve attempted to use slowAES to encrypt same piece of data I’ve received completely different cipher.
var testString = new Array("w", "a", "t", "s", "o", "n", "?");
var test = slowAES.encrypt(testString, slowAES.modeOfOperation.CBC, "12345678901234567890123456789012", slowAES.aes.keySize.SIZE_256, new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
alert(test.cipher);
Can someone point me into right direction? I don’t care on the method, as long as I can achieve results. My goal is to take URL for example:
www.test.com/clientid=123
use .NET (C#) to encrypt it to look like
www.test.com/clientid=asdf;lkjsxd;flkjq934857u9duhfgkjhgalsdkjfh
and then use JavaScript to convert it back to
www.test.com/clientid=123
Thanks, ITRushn