I have received some data in base64string format from JSON pasring in iphone. Now i want that data to store or decode in String. I have user Base64 class. It return me null value. so pls help me!!!
I hope it will helpful to you
NSString *decodeString = @"Raja";
Encode String
NSData *encodeData = [decodeString dataUsingEncoding:NSUTF8StringEncoding];
NSString *base64String = [encodeData base64EncodedStringWithOptions:0];
NSLog(@"Encode String Value: %@", base64String);
Decode String
NSData *decodedData = [[NSData alloc] initWithBase64EncodedString:base64String options:0];
NSString *decodedString = [[NSString alloc] initWithData:decodedData encoding:NSUTF8StringEncoding];
NSLog(@"Decode String Value: %@", decodedString);