AES128 truncated decrypted text on iOS 7, no problems on iOS 8
问题 Using ciphertext encrypted with AES128 using ECB mode (this is toy encryption) and PKCS7 padding, the following code block results in the complete plaintext being recovered under iOS 8. Running the same code block under iOS 7 results in the correct plaintext, but truncated. Why is this? #import "NSData+AESCrypt.h" // <-- a category with the below function #import <CommonCrypto/CommonCryptor.h> - (NSData *)AES128Operation:(CCOperation)operation key:(NSString *)key iv:(NSString *)iv { char