EVP_RSA_gen function

  1. @RecordUse.new()
  2. @Native<Pointer<EVP_PKEY> Function(UnsignedInt)>(ffi.UnsignedInt)>(symbol: 'bssl_dart_EVP_RSA_gen')
Pointer<EVP_PKEY> EVP_RSA_gen(
  1. int bits
)

EVP_RSA_gen generates a new RSA key with the specified number of bits. It returns a newly-allocated EVP_PKEY or nullptr on error.

This function sets the public exponent to the recommended value of 65537, or RSA_F4. To use a less common value, instead use EVP_PKEY_CTX_set_rsa_keygen_pubexp and EVP_PKEY_keygen.

Implementation

@meta.RecordUse()
@ffi.Native<ffi.Pointer<EVP_PKEY> Function(ffi.UnsignedInt)>(
  symbol: 'bssl_dart_EVP_RSA_gen',
)
external ffi.Pointer<EVP_PKEY> EVP_RSA_gen(
  int bits,
);