There's a BIO that handles BASE-64 encoding and decoding.  It
makes the files much friendlier to naive editors and operating
systems since it forces the contents to standard ASCII characters
and you aren't dealing with \xxx encodings in your editors.  Does
DOS/Windows still need that silly explicit "binary" vs "character"
mode on fopen()?  If it does, it could be something as simple as
LF -> CRLF coercion.

The only other question is whether you're sure you're reading and
writing all of the available data, using an element size of one,
etc.  All the boring standard stuff when using fread()/fwrite().

Bear

Sheehan, Tim wrote:
> I'm working in C.
> 
> I'm actually using the AES 256 algorithm. It has been bolted in
> to the SSL like DES(and other enc algs).  The encryption piece
> appears to be working well.  I can cipher&decipher without any
> issues.  It is when I store that encrypted string to a file. 
> The file being written is opened with fopen and then fwrite 
> and fread are used to write & read.  
> 
> When I write it out to the file is shows up in a binary format eq.
> 
> "\326\34368^H\316f]\234^E\371^C\342\246\217<d=\341?^R\310\237[>3^\:\236\241\
> 206\243"
> 
> Then when I am reading it back, the unique characters are interpreted
> incorrectly.
> T
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to