Hi!
I'm trying to decrypt a string with the following code:

   AutoSeededRandomPool rng;
   RSAES_OAEP_SHA_Encryptor e(pk);
   string cipher;
   StringSource(message, true, new PK_EncryptorFilter(rng, e, new
StringSink(cipher)));

But I keep getting this exception:
terminate called after throwing an instance of
'CryptoPP::InvalidArgument'
  what():  RSA/OAEP-MGF1(SHA-1): message length of 197 exceeds the
maximum of 150 for this public key

How do I tell RSAES_OAEP_SHA_Encryptor to use a specific mode, so that
this error won't happen?

Thanks

-- 
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.

Reply via email to