标签:developer ons 字符串 using ini ring nbsp utf8 nsstring
字符串,base64加密
NSData *nsdata = [@"iOS Developer Tips encoded in Base64"
dataUsingEncoding:NSUTF8StringEncoding];
NSString *base64Encoded = [NSData base64EncodedStringWithOptions:0];
NSLog(@"Encoded: %@", base64Encoded);
字符串,base64解密
NSData *nsdataFromBase64String = [[NSData alloc]
initWithBase64EncodedString:base64Encoded options:0];
NSString *base64Decoded = [[NSString alloc]
initWithData:nsdataFromBase64String encoding:NSUTF8StringEncoding];
NSLog(@"Decoded: %@", base64Decoded);
字符串,base64加密
标签:developer ons 字符串 using ini ring nbsp utf8 nsstring
原文地址:http://www.cnblogs.com/lrr0618/p/7324826.html