Fixed a slight bug in RSA encryption code.

master
madmaxoft 2014-01-28 09:50:48 +01:00
parent 5f9228bac8
commit 81837edb22
1 changed files with 1 additions and 2 deletions

View File

@ -214,7 +214,6 @@ int cRSAPrivateKey::Encrypt(const Byte * a_PlainData, size_t a_PlainLength, Byte
ASSERT(!"Invalid a_PlainLength!");
return -1;
}
size_t DecryptedLength;
int res = rsa_pkcs1_encrypt(
&m_Rsa, ctr_drbg_random, &m_Ctr_drbg, RSA_PUBLIC,
a_PlainLength, a_PlainData, a_EncryptedData
@ -223,7 +222,7 @@ int cRSAPrivateKey::Encrypt(const Byte * a_PlainData, size_t a_PlainLength, Byte
{
return -1;
}
return (int)DecryptedLength;
return (int)m_Rsa.len;
}