当前位置: 动力学知识库 > 问答 > 编程问答 >

encryption - Php mcrypt not decrypting data required while using cbc mode

问题描述:

This question already has an answer here:

  • How to encrypt/decrypt data in php?

    4 answers

网友答案:

When decrypting, you need to use the same IV and key as when encrypting.

Your encrypt function needs to return the IV as well as the encrypted data. That IV should then be sent to the decrypt function along with the data and the key.

分享给朋友:
您可能感兴趣的文章:
随机阅读: