0
我得到了TSimpleCodec.Begin_EncryptMemory - 錯誤的模式異常執行以下代碼。有什麼問題嗎?TSimpleCodec.Begin_EncryptMemory - 錯誤模式
FLibrary := TCryptographicLibrary.Create(Self);
FCodec := TCodec.Create(Self);
FCodec.CryptoLibrary := FLibrary;
FCodec.BlockCipherId := 'native.AES-256';
FCodec.ChainModeId := 'native.ECB';
FCodec.Password := 'password';
plain := 'The plain text';
FCodec.EncryptString(plain, astr);
FCodec.DecryptString(dec, astr);
我注意到,如果忘記指定密碼,'錯誤模式'也會出現。在上面的例子中只是註釋掉「FCodec.Password:=」。我建議一個特定的錯誤消息。 – 2012-06-07 13:32:10
好點。我會看看那個。 – 2012-06-08 00:22:38