Hi,
I am using the RSA encryptor from the cryptography library. I am using a 1024 bits public key for encryption.
TBuf8<16> aesKeys;
aesKeys.Copy(_L8("1234567890123456"));
TBuf8<128> outputs;
for(TInt j = 0; j < 600; j++)
{
CRSAPKCS1v15Encryptor* iRSAEncryptors = CRSAPKCS1v15Encryptor::NewLC(*iPublicKey);
iRSAEncryptors->EncryptL(aesKeys, outputs);
if(outputs.Length()!=128) //128 bytes = 1024 bits
{
......
}
}
I realise that on several occasions, the length of the encrypted text is not 1024 bits but 1020 bits! I have tried using TBuf and HBufC to store the encrypted text but the bug still occurs.
Please advise. Thanks.



