Decrypting data that was AES encrypted with Objective-C with Java

前端 未结 3 718
没有蜡笔的小新
没有蜡笔的小新 2021-02-03 15:25

I try to decrypt data that was originally encrypted with Objective-C in Java.

There are other questions mentioning this but they are really cluttered and many of them a

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-03 16:13

    This is probably not contributing to your problem, but it's wrong anyway:

       char * keyPtr[kCCKeySizeAES128+1]; // room for terminator (unused)
    

    That defines an array of kCCKeySizeAES128 + 1 pointers, not kCCKeySizeAES128 + 1 bytes. As it happens, it is OK because the buffer you get is four or eight times larger than you need depending on whether you are compiling for 32 or 64 bit.

提交回复
热议问题