Hi all,
I use this code to decrypt a cipher string:
(const char *)ciphertext = base64.decode(data.c_str()).c_str();
//data.Trim();
ECB_Mode<DES_EDE3>::Decryption ecbDecryption((const byte
*)DataToKeepIntoKey.DecryptionParams, DES_EDE3::DEFAULT_KEYLENGTH);
StreamTransformationFilter decryptor(ecbDecryption,
NULL,StreamTransformationFilter::ZEROS_PADDING);
//Get length of ciphertext and feed it into the
decryptor
//then tell it all done feeding
w/MessageEnd
inputLength = data.Length();
decryptor.Put((byte *)data.c_str(), inputLength);
decryptor.MessageEnd();
But When I do this, I get an Exception error that the cipher text is
not a correct length.
I though the streamtransformationFilter will pad it with '\0' the last
block ?
When I look at the size of decoded (base64) the size is not a 8bytes
bondary.
Should I pad it before trying to decrypt my cipher text ? or the
filter should do it ?
Regards
Dumarjo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---