I have a static library that i made for encryption an XML serialization with i use in my projects. This code worked perfectly until now. but when i included it in my latest project i got an error, i know this error usually appears when the object i call is not properly allocated witch is not the case here the NSLog returns the NSData for my encryption.
What could be the problem?
The error i get is
-[NSConcreteData base64EncodingWithLineLength:]: unrecognized selector sent to instance 0x1c9150
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteData base64EncodingWithLineLength:]: unrecognized selector sent to instance 0x1c9150'
Here is my code:
NSData * encryptedMsg =[crypto encrypt:MsgEnc key:[accessdata->Certificate dataUsingEncoding:NSUTF8StringEncoding] padding:&padding];
NSLog(@"encryptedMsg %@",encryptedMsg);
NSString * msg = [NSString stringWithFormat:@"%@", [encryptedMsg base64EncodingWithLineLength:0]];