RSA_padding_add_PKCS1_PSS_mgf1 function
RSA_padding_add_PKCS1_PSS_mgf1 writes a PSS padding of |mHash| to |EM|, where |mHash| is a digest produced by |Hash|. |RSA_size(rsa)| bytes of output will be written to |EM|. The |mgf1Hash| argument specifies the hash function for generating the mask. If NULL, |Hash| is used. The |sLen| argument specifies the expected salt length in bytes. If |sLen| is -1 then the salt length is the same as the hash length. If -2, then the salt length is maximal given the space in |EM|.
It returns one on success or zero on error.
This function implements only the low-level padding logic. Use |RSA_sign_pss_mgf1| instead.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Pointer<RSA>,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<EVP_MD>,
ffi.Pointer<EVP_MD>,
ffi.Int,
)
>(symbol: 'bssl_dart_RSA_padding_add_PKCS1_PSS_mgf1')
external int RSA_padding_add_PKCS1_PSS_mgf1(
ffi.Pointer<RSA> rsa,
ffi.Pointer<ffi.Uint8> EM,
ffi.Pointer<ffi.Uint8> mHash,
ffi.Pointer<EVP_MD> Hash,
ffi.Pointer<EVP_MD> mgf1Hash,
int sLen,
);