What does RijndaelManaged encryption do with invalid key sizes
问题 We are trying to integrate with a legacy c# application that uses RijndaelManaged for symmetric encryption. However it appears that they have used a 13 byte string as an encryption key! The code is basically: var initVectorBytes = Encoding.ASCII.GetBytes("16-char string"); var keyBytes = Encoding.ASCII.GetBytes("13-char string"); var symmetricKey = new RijndaelManaged { Mode = CipherMode.CBC }; var decryptor = symmetricKey.CreateDecryptor(keyBytes, initVectorBytes); var memoryStream = new