iPhone: How to encrypt a string

前端 未结 3 1905
借酒劲吻你
借酒劲吻你 2021-02-02 04:15

I would like to encrypt a string with AES 256 on the iPhone but have not found much via google. What I am trying to do is post some data to a web site as part of a game I am cr

相关标签:
3条回答
  • 2021-02-02 04:56

    You can just use the CryptoHelper which is adopted by CyrptoExercise Sample Project

    0 讨论(0)
  • 2021-02-02 04:59

    Check out this site: http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html

    0 讨论(0)
  • 2021-02-02 05:21

    A much easier approach here would be to use an HTTPS POST, which would give you similar protections with far less code, though there are still difficulties for solving the problem you're attacking. The kind of solution you're describing generally requires some kind of shared secret, and it's very hard to protect code using a shared secret for long. You may find these posts helpful:

    • Machine ID for Mac
    • Store an encryption key in Keychain while application installation process
    • Obfuscating Cocoa

    Still, HTTPS is probably a much better solution than AES here.

    0 讨论(0)
提交回复
热议问题