Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Base64 Encode Data in Objective-C

Hi Guys,

I need to encode data in an objective-c application and I am using base64 encoding to encode the data. But I am not able to find the header files openssl/bio.h and openssl/evp.h. And if I add libcrypto.dylib library in my project then I am getting the error of library not found.

Please let me know if anybody knows how can I get the openssl package to encode the data.

Thanks in advance,
Ishita

Mac Mini, Mac OS X (10.4.11)

Posted on Jul 1, 2008 3:59 AM

Reply
9 replies

Jul 31, 2008 9:10 PM in response to ishita

Sorry for the "me, too" post, but I have a similar need to import certain openssl header files. I have some code that does

#include <openssl/bio.h>

that results at compile time in:

error: openssl/bio.h: No such file or directory

I actually have this file on my system in /usr/include/openssl/bio.h, and I would have assumed that XCode would have found it without further ado, but ...

I'm an XCode newcomer. Can someone please provide information on how to configure the project to find these header files?

Thank you.

Sep 24, 2008 10:31 AM in response to ishita

So has anybody solved this problem yet? if so it would be nice if somebody could post what they did.
-I added the linker flags, and nothing changes (don't even get an error).
-I tried to add under frameworks the existing files of libcrypto, or libssl, but neither of those do anything. They are just written in red and don't change anything.

If anybody could post some information it would be great.

-Raz

Sep 24, 2008 3:15 PM in response to razvan.orendovici

I don't have the code anymore but it wasn't too much work to write an Obj-C base64 encoder/decoder. My issue with it was that for large audio files it was too slow so I just post NSData directly to my server now. Google it and you should find some other implementations in both C and C++. I tried a bunch and they all worked just not for me case.

Base64 Encode Data in Objective-C

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.