![](/img/trans.png)
[英]PHP's mcrypt_encrypt and openssl command line output different cipher
[英]Why the length of cipher text generated by php via mcrypt_encrypt() is different from the one generated by C via openssl encryption library
您应该查找例如mcrypt_encrypt
的注释部分,以使用PKCS#7填充方法填充纯文本消息。 PHP使用零填充直到块边界上的第一个值,而不是通常使用的即席PKCS#7填充方法。
填充为零的问题在于,它对于以00
字节结尾的消息不是确定性的,因为在取消填充过程中可能会删除该值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.