Encrypted data is binary as you know, but you may filter your binary encryption 
results through the hexadecimal or base64 filters to return string representations of 
the binary encrypted data. 

Hex filtering will of course return two bytes of char for every one byte of binary 
(encrypted) data. Base64 encoding returns three bytes of char for every two bytes of 
binary, making it more efficient than hex. The hex or base64 strings will have to be 
decoded back to binary before decrypting.

Many of us old-timers remember the UNIX "od" filter which stands for "octal dump". 
Octal representation takes THREE characters of string to represent each byte of binary 
information. I am not sure why Wei has not included an octal filter in the library 
since it is a trivial exercise, however, the resulting text is so inefficient it would 
probably not see much use by the crypto community. I have my own library of hex, 
octal, ebcdic/ascii and other conversion routines that I will share on request. It is 
in old-style C but compiles fine in MS VC++

Filters for hex and base64 conversion are, of course, included in CryptoPP

I hope this helps!
-Michael

-----Original Message-----
From: sowmya hn [mailto:[EMAIL PROTECTED]
Sent: Friday, July 11, 2003 5:16 AM
To: [EMAIL PROTECTED]
Subject: To get encrypted data in form of a string


I am using the method ApplyFunction of
RSAFunction(defined in rsa.h) for encrypting the
password using RSA algorithm. I would like to get
encrypted data in form of a string. Is there any way
to get(any encoders??).I cannot return Integer, return
from ApplyFunction .
Thank you
Sowmya

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Reply via email to