I am currently trying to get a small soap client to work, which includes to send a certificate file within the xml of the request.
I have no trouble getting the file into an NSData object – but then I have to convert it to some Base64 String. Environment is Mac OSX, Xcode 4.3.
I have found a lot of older posting dealing with that – but the best I found was some code that made use of OpenSSL libs and where containing loads of deprecated methods.
So, my question is as follows:
Is there a better way than to use the OpenSSL libs?
If yes, do you perchance have some URL or more recent code scraps?
If no, I guess there is some project out there which deals with Base64 that can be recommended. After all Base64 is not that uncommon.
Thanks for your help!
Here is a base64 encoding done with CommonCrypto:
it is very easy code, it would not be difficult to put it in a category
if you add this to your project you need also to add the Security.framework