EVP_PKEY_from_ec_private_scalar function

  1. @RecordUse.new()
  2. @Native<Pointer<EVP_PKEY> Function(Pointer<EVP_PKEY_ALG>, Pointer<Uint8>, Size)>(ffi.Pointer<EVP_PKEY_ALG>, ffi.Pointer<ffi.Uint8>, ffi.Size)>(symbol: 'bssl_dart_EVP_PKEY_from_ec_private_scalar')
Pointer<EVP_PKEY> EVP_PKEY_from_ec_private_scalar(
  1. Pointer<EVP_PKEY_ALG> alg,
  2. Pointer<Uint8> in$,
  3. int len
)

EVP_PKEY_from_ec_private_scalar decodes len bytes from in as an EC private key, encoded as a big-endian, zero-padded integer. The EC curve is determined by alg, which must be an EC algorithm (i.e. one of EVP_pkey_ec_*). The input must be fully reduced and padded to the size of the group order (e.g. 32 bytes for P-256) or the import will fail.

This function returns a newly-allocated EVP_PKEY on success or NULL on error.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Pointer<EVP_PKEY> Function(
    ffi.Pointer<EVP_PKEY_ALG>,
    ffi.Pointer<ffi.Uint8>,
    ffi.Size,
  )
>(symbol: 'bssl_dart_EVP_PKEY_from_ec_private_scalar')
external ffi.Pointer<EVP_PKEY> EVP_PKEY_from_ec_private_scalar(
  ffi.Pointer<EVP_PKEY_ALG> alg,
  ffi.Pointer<ffi.Uint8> in$,
  int len,
);