RSA_private_encrypt

RSA private-key encryption (raw primitive / signing-style) (deprecated).

Synopsis

Declared in <openssl/rsa.h>

[[deprecated]]
int
RSA_private_encrypt(
    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

Number of bytes written to to, or a negative value on error.

Parameters

NameDescription
flenLength of from in bytes.
fromInput bytes to encrypt with the private key.
toOutput buffer of at least RSA_size(rsa) bytes.
rsaRSA private key.
paddingPadding mode such as RSA_PKCS1_PADDING or RSA_NO_PADDING.