DCPCrypt/Delphi not properly encoding Rijndael

我是研究僧i 提交于 2019-12-06 11:37:58

Key size parameter in Init method is in bits - as stated by the method comment:

Do key setup based on the data in Key, size is in bits

You are calculating the AES with KeySize = 32 bits, which is invalid.

So you compute for the lowest available Keysize, which is 128. The returned value is correct for 128 bit - see http://csrc.nist.gov/groups/STM/cavp/documents/aes/AESAVS.pdf page 20.

Try to specify 256 bits as key size:

 DCP_rijndael1.Init(KeyBuf,256,@IVBuf);  
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!