Encryption using AES-128 in Android and IPhone (Different result)

前端 未结 5 622
误落风尘
误落风尘 2020-12-13 21:57

I am trying to encrypt some text using the AES algorithm on both the Android and IPhone platforms. My problem is, even using the same encryption/decryption algorithm (AES-12

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 22:10

    If you want an example of compatible code for Android and iPhone, look at the RNCryptor library for iOS and the JNCryptor library for Java/Android.

    Both projects are open source and share a common data format. In these libraries, AES 256-bit is used, however it would be trivial to adapt the code if necessary to support 128-bit AES.

    As per the accepted answer, both libraries use PBKDF2.

提交回复
热议问题