[Botan-devel] PK_Decryptor_MR_with_EME: Input is invalid
Jack Lloyd
lloyd at randombit.net
Tue Dec 4 16:20:59 EST 2007
On Tue, Dec 04, 2007 at 10:21:49PM +0100, z3ky wrote:
> > SecureVector<byte> ciphertext= enc->encrypt(msg, sizeof(msg));
[...]
> > SecureVector<byte> plaintext = dec->decrypt(ciphertext,
> > sizeof(ciphertext));
sizeof(ciphertext) will return the size of the underlying structure
(which is of a fixed size), rather than the amount of data that the
SecureVector is holding. Try ciphertext.length() instead.
Jack
More information about the botan-devel
mailing list