RSA_private_decrypt function
RSA_private_decrypt decrypts flen bytes from from with the public key in
rsa and writes the plaintext to to. The to buffer must have at least
RSA_size bytes of space. It returns the number of bytes written, or -1 on
error. The padding argument must be one of the RSA_*_PADDING values. If
in doubt, use RSA_PKCS1_OAEP_PADDING for new protocols. Passing
RSA_PKCS1_PADDING into this function is deprecated and insecure. See
RSA_decrypt.
When padding is RSA_PKCS1_OAEP_PADDING, this function has no way to set
the OAEP or MGF-1 digest, so it is always SHA-1. For other OAEP parameters,
wrap rsa in an EVP_PKEY and use EVP_PKEY_decrypt with
EVP_PKEY_CTX_set_rsa_padding and related functions.
WARNING: this function is dangerous because it breaks the usual return value
convention. Use RSA_decrypt instead.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Size,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<RSA>,
ffi.Int,
)
>(symbol: 'bssl_dart_RSA_private_decrypt')
external int RSA_private_decrypt(
int flen,
ffi.Pointer<ffi.Uint8> from,
ffi.Pointer<ffi.Uint8> to,
ffi.Pointer<RSA> rsa,
int padding,
);