Use fprintf with the %d format specifier. As you loop thru your buffer to
print the encrypted buffer out to your file. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sheehan, Tim
Sent: Tuesday, September 27, 2005 4:23 PM
To: 'openssl-users@openssl.org'
Subject: RE: printing encrypted strings

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

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adam Jones
Sent: Tuesday, September 27, 2005 5:09 PM
To: openssl-users@openssl.org
Subject: RE: printing encrypted strings


What type of encryption are you using? And what function are you using to
print it out. I have used cout and it works fine with that. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sheehan, Tim
Sent: Tuesday, September 27, 2005 3:46 PM
To: 'openssl-users@openssl.org'
Subject: printing encrypted strings

Hi,
I am trying to store encrypted data into an ascii file.  
The encrypted output appears to be in a binary format.  
Are there SSL functions I should use to convert to an ascii format before
moving it to the file?

thx,
Tim
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]


Confidentiality Notice:

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the named addressee you should not disseminate, distribute or
copy this e-mail. Please notify the sender immediately by e-mail if you have
received this e-mail by mistake and delete this e-mail from your system.  If
you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents of
this information is strictly prohibited.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]


Confidentiality Notice:

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.  If 
you are not the named addressee you should not disseminate, distribute or copy 
this e-mail. Please notify the sender immediately by e-mail if you have 
received this e-mail by mistake and delete this e-mail from your system.  If 
you are not the intended recipient you are notified that disclosing, copying, 
distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to