I decided to work on get my encrypt and decrypt methods in stages. The
first stage is to get the plain text string compressed and decompressed
correctly.

Gcc:3.2.3
Crypto:5.1

Compress:

string gzip_text;
Gzip aes_compressor2 (new StringSink (gzip_text));
StringStore(plaintext).TransferTo(aes_compressor2);

string unzip_text;
Gunzip aes_decompressor2 (new StringSink (unzip_text));
StringStore(gzip_text).TransferTo(aes_decompressor2);

I got this from searching the archive of the mailing list. Shame we do
not have a directory of example programs. Is this right? So far I
believe it does not because what I get in 'unzip_text' is rubbish.

Plaintext char:  B  o  o     H  o  o     I     a  m     s  o     s  c 
a  r  e  d
Plaintext hex:  0x42  0x6f  0x6f  0x20  0x48  0x6f  0x6f  0x20  0x49 
0x20  0x61  0x6d  0x20  0x73  0x6f  0x20  0x73  0x63  0x61  0x72  0x65 
0x64

<OUTPUT: Compress plain text>
Compressed text2:  0x1f  0xffffff8b  0x8  0  0  0  0  0  0  0

<OUTPUT: Decompressed plain text>
Decompressed text2:

Stephen

Reply via email to