misc.log

日常茶飯事とお仕事と

DES復号の際にキーが違う場合のエラー

後で再度出すの面倒なので、エラー内容を書いておく。

System.Security.Cryptography.CryptographicException: データが正しくありません。

   at System.Security.Cryptography.CryptoAPITransform._DecryptData(IntPtr hKey, Byte rgb, Int32 ib, Int32 cb, Boolean fDone)
   at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.Read(Byte buffer, Int32 offset, Int32 count)
   at System.IO.StreamReader.ReadBuffer(Char userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
   at System.IO.StreamReader.ReadToEnd()