我爲此Convert.FromBase64String方法得到一個FormatException。我不介意硬編碼的價值。任何人都可以解釋爲什麼我得到這個例外Convert.FromBase64String FormatException
// Instantiate a new RijndaelManaged object to perform string symmetric encryption
RijndaelManaged rijndaelCipher = new RijndaelManaged();
// Set key and IV
rijndaelCipher.Key = Convert.FromBase64String("TASK");
rijndaelCipher.IV = Convert.FromBase64String("0123");
謝謝。
你知道Base64是什麼,以及Rijndael算法的密鑰和IV型是? – SLaks 2010-10-04 13:50:39
不,我不需要一些快速的工作:) – 2010-10-04 14:03:41
_不要使用密碼學,如果你不明白它。否則,您**將**創建安全漏洞。 – SLaks 2010-10-04 14:06:30