Objective-c-AES PHP compatibility issues in iOS

Source: Internet
Author: User
Tags php server
The iOS and server-side exchange tokens take security into account, AES encryption is required, iOS encryption is encrypted on the PHP server and the results are empty, and an open source code on GitHub is used on the iOS side.

Https://github.com/Gurpartap/AESCrypt-ObjC

But the server side can not resolve the data sent by iOS is not compatible with PHP better library recommendations? Or how do you deal with AES cross-platform parsing?

Note: The issue has been resolved using another library thanks to the almighty GitHub thanks to the author Rnapierhttps://github.com/rnapier/rncryptor.git

Reply content:

The iOS and server-side exchange tokens take security into account, AES encryption is required, iOS encryption is encrypted on the PHP server and the results are empty, and an open source code on GitHub is used on the iOS side.

Https://github.com/Gurpartap/AESCrypt-ObjC

But the server side can not resolve the data sent by iOS is not compatible with PHP better library recommendations? Or how do you deal with AES cross-platform parsing?

Note: The issue has been resolved using another library thanks to the almighty GitHub thanks to the author Rnapierhttps://github.com/rnapier/rncryptor.git

The AES algorithm is not as simple as RC4, and there are many conditions that affect encryption and decryption.

For example, the different initialization vector IV will affect the encryption results, AES key length, mode (such as ECB, CBC, etc.). For example, in the AES library you use, the AES-256-CBC mode is used.

Look at the two points I said above is not the same, otherwise, there may be algorithmic problems.

PHP's algorithm library uses MCrypt more, the basic of OBJC is the encapsulation of system functions.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.