RSA_private_decrypt

Decrypt flen ciphertext bytes with RSA private key rsa (deprecated).

Synopsis

Declared in <openssl/rsa.h>

[[deprecated]]
int
RSA_private_decrypt(
    int flen,
    unsigned char const* from,
    unsigned char* to,
    RSA* rsa,
    int padding);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

Length of the recovered plaintext, or a negative value on error.

Parameters

NameDescription
flenLength of from in bytes (typically RSA_size(rsa)).
fromCiphertext produced by RSA_public_encrypt() (or equivalent).
toOutput buffer large enough for the recovered plaintext.
rsaRSA private key.
paddingPadding mode that was used when encrypting.