- (NSString *)resultNSStringToBase64:(NSData *)baseStr{
// Base64b编码
NSString * Base64Str = [baseStr base64EncodedStringWithOptions:0];
return Base64Str;
}
- (NSData *)resultNSdataToBase64:(NSString *)baseStr
{
// Base64解码
NSData * data = [[NSData alloc]initWithBase64EncodedString:baseStr options:NSDataBase64DecodingIgnoreUnknownCharacters];
return data;
}
网友评论