On Sat, Dec 24, 2005, Arsen Hayrapetyan wrote:

> When I am passing RSA_size(rsa) as the first argument to
> RSA_private_decrypt(), I
> am receiving the initial message decoded as "Test messageA". I have
> allocated the
> RSA_size(rsa) bytes for the buffer receiving the decodod text. Does the
> decoding function return
> STRING (null-terminated)?
> 

The data passed to the functions is treated as unstructured binary data of a
given length.

If you pass strlen(string) as the length it will encrypt the string and not
the null terminator because the string with null terminator is of length
strlen(string) + 1.

The decrypted length is the return value of the function as indicated in the
manual pages.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to