Running that code produces an error saying:

RSA/OAEP-MGF1(SHA-1): ciphertext length of 256 doesn't match the required
length of 1 for this key

rsa is a generated keypair (RSA-1024), and auth. is my class object that
calls the above code.

   try {
   std::string word = "hello world!";
   std::string enc = auth.RSAEncrypt(rsa.GetPublicExponent(),
rsa.GetModulus(), word);
   cout << "RSA Encode: " << enc << endl;
   std::string dec = auth.RSADecrypt(rsa.GetPrivateExponent(), enc);
   cout << "RSA Decode: " << dec << endl << endl;
   }
   catch(CryptoPP::Exception e) {
           cout << e.GetWhat() << endl;
   }
-- 
View this message in context: 
http://old.nabble.com/RSA-Encryption-Decryption-tp31471628p31483379.html
Sent from the Crypto++ Users mailing list archive at Nabble.com.

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