Thanks for the information. I do agree that, the encrypted data will be in a binary format. As mentioned earlier i need to use RSAFunction::ApplyFunction for encrypting. This returns an Integer.I need to give string equivalent of this Integer to other pgm written in java. To get a string out of this integer, i could think of Integer::Encode(byte* output,unisigned int outputlen,SignedNess=UNSIGNED) const which encodes Integer in big endian format and then use Base64 encoder to encode these bytes to get string. But I am not finding any methods in Crypto C++ pkg to extract corressponding string or char *. Pl. let me know regarding the same.
FYI: the encoded string will be decoded at the receiving java end and the same will be decoded using Base64 decoder and the string will decrypted using RSA. --- Michael Barnett <[EMAIL PROTECTED]> wrote: > 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 > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
