During migration phase, we have an issue where the user does a partial update of the app, and we start reading from the old NSUserDefaults plist before we can update its values to the encrypted version. This causes a crash on line 137
CocoaSecurityResult *result = [CocoaSecurity aesDecryptWithData:data key:aesKey iv:aesIv];
where the data object is actually an NSString (other other object types) underneath.
Updating to verify data is of class NSData before passing it down for decryption.
During migration phase, we have an issue where the user does a partial update of the app, and we start reading from the old
NSUserDefaults
plist before we can update its values to the encrypted version. This causes a crash on line 137CocoaSecurityResult *result = [CocoaSecurity aesDecryptWithData:data key:aesKey iv:aesIv];
where thedata
object is actually an NSString (other other object types) underneath.Updating to verify
data
is of classNSData
before passing it down for decryption.