Converting C# Cryptography.Rijndael encryption to Javascript (pref. crypto-js)
问题 I have two system which are sharing a user database, so authentication needs to be the same. The passwords are currently encrypted using C#'s Cryptography.Rijndael (N.B. not RijndaelManaged). Using a custom key and iv (initialisation vector). (CBC mode and Pkcs7 padding) The C# encryption is as follows: Rijndael alg = Rijndael.Create(); alg.Key = key; alg.IV = IV; CryptoStream cs = new CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write); cs.Write(clearData, 0, clearData.Length);