What is the easiest and fastest code to do a conversion between NSData and a base64 string? I\'ve read a bunch of solutions at SO and mostly they involve in add
You don't need any custom implementation. Creating base64 from NSData is shown in other answers. There is opposite direction. From Base64 string to NSData:
NSString *base64Encoded = @"some base64 string";
NSData *nsdataFromBase64String = [[NSData alloc] initWithBase64EncodedString:base64Encoded options:0];