How to implement php's openssl_encrypt() method in iOS Objective-C?

后端 未结 1 1577
别跟我提以往
别跟我提以往 2021-01-29 08:06

I want to implement php\'s openssl_encrypt() method in iOS Objective-C. Therefore I tried this code:

    #import 

        
1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-29 08:48

    1. decodedKeyData is 32 bytes )(256-bits) but the key size is specified as kCCKeySizeAES192.

    2. Just use randomBytes as the IV, there is no point in converting it is Base64 and back.

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