Hello, > int encSize = RSA_public_encrypt(size, inText, sigBuffer, rsaPubKey, > RSA_PKCS1_OAEP_PADDING); > if(encSize == -1) > { > cout << "error encrytping with public key" << endl; > return -1; > } > int decryptRetVal = RSA_private_decrypt(encSize, sigBuffer, plainText, > rsaPrivKey, RSA_PKCS1_OAEP_PADDING); > if(decryptRetVal == -1) > { > cout << "error decrypting with private key" << endl; > return -1; > } RSA_private_decrypt() returns real number of decrypted data (after removing padding) you should get it here. Only without padding (PADDING_NONE) this return value will be equal to key size.
Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]