请大神帮忙,关于国密SM4-CBC加解密的密钥长度超限的问题?
php吧
全部回复
仅看楼主
level 1
ai5shan 楼主
采用openssl 1.1.1, openssl_encrypt()加密算法。
现在要求是32个字节的密钥,和32个字节的偏移量。超过后会导致偏移量提示超限,密钥也被截切到16字节。提示错误如下:
Warning: openssl_decrypt(): IV passed is 32 bytes long which is longer than the 16 expected by selected cipher。
请问大神有什么办法来实现?
2024年08月28日 05点08分 1
1