> From: [email protected] On Behalf Of Jakob Bohm
> Sent: Thursday, 28 March, 2013 20:53

> Look up the documentation of the following OpenSSL functions 
> (Yes this 
> is a bit roundabout for encoding a single string, but this is all 
> OpenSSL exposes):
> 
> BIO_f_base64
> BIO_s_mem
> 
> A better way is to use a non-OpenSSL library to Base64 (or Base32 or 
> Base85 or Base16 or whatever you like) the binary data 
> directly, without 
> the gratuitous insertion of newlines and "=" sign padding done
> by the file-oriented BIO_f_base64.
> 
The newlines and padding are required by PEM, and MIME, 
and even today sometimes useful for their intended use cases.
You can suppress the newlines with BIO_FLAGS_BASE64_NO_NL .
(But not in PEM_read/write_xxx which manages its own b64BIO.)

EVP_{Encode,Decode}Block aren't documented but are external-linkage 
in evp.h (not evp_locl.h) and have been stable for a long time, 
and straightforward to use.

Or as you say another base64 implementation or other encoding.

> An even better way is to use the SQL syntax for explicitly specifying
> non-textual bytes in field values (ask an SQL expert or read the 
> documentation that came with your database development tools).
> 
That too.



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to