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 : ="를 주석 처리하십시오. 특정 오류 메시지를 제안합니다. –
좋은 지적. 나는 그것을 보게 될 것이다. –