I'm having troubles to retrieve NSString from a previous generated NSData from RNCryptor.
In my app I generate an NSData from NSString using RNCryptor. This NSData is stored in Keychain ( previously converted to base 64 NSString ).
When I need this information, I retrieve this NSString from keychaing and convert to NSData ( using reverse base 64 ).
Once I have this NSDate I apply RNDecryptor in order to have the original NSString.
The problem I have is that RNDecryptor returns an NSData that I try to convert into NSString using NSUTF8StringEncoding but it returns an error.
NSData *data=[RNDecryptor decryptData:datafrombase64 withPassword:pass error:&error];
NSString *srcString=[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
Does someone know the way to retrieve NSString?
This seems like a problem with using the RNCryptor library and isn't related to any issues with SSKeychain.
But if you want to know the answer to this, you can take a look at my post here:
or see the other posts for alternate answers.