Wednesday 20 April 2016

Help. Trying to decipher .net encryption

I have some encrypted data from a .net application using Rijndael AES with a 256bit (32bytes) symmetric encryption key (obviously I have this publickey). Im using node and trying to decrypt this. The developers have offered a c# method of decryption, but they dont work in node so cant offer advice here.Their code ispublic static string Decrypt(string toDecrypt) { byte[] keyArray = UTF8Encoding.UTF8.GetBytes(_mySymmetricPublicKey); // AES-256 key byte[] toEncryptArray = Convert.FromBase64String(toDecrypt); RijndaelManaged rDel = new RijndaelManaged(); rDel.Key = keyArray; rDel.Padding = PaddingMode.PKCS7; // better lang support ICryptoTransform cTransform = rDel.CreateDecryptor(); byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length); return UTF8Encoding.UTF8.GetString(resultArray); } Can anyone point me in the direction of what module and method may work here?

Submitted April 20, 2016 at 05:04PM by itsmoirob

No comments:

Post a Comment