EVP_SignFinal function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<EVP_MD_CTX>, Pointer<Uint8>, Pointer<UnsignedInt>, Pointer<EVP_PKEY>)>(ffi.Pointer<EVP_MD_CTX>, ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<EVP_PKEY>)>(symbol: 'bssl_dart_EVP_SignFinal')
int EVP_SignFinal(
  1. Pointer<EVP_MD_CTX> ctx,
  2. Pointer<Uint8> sig,
  3. Pointer<UnsignedInt> out_sig_len,
  4. Pointer<EVP_PKEY> pkey,
)

EVP_SignFinal signs the data that has been included by one or more calls to |EVP_SignUpdate|, using the key |pkey|, and writes it to |sig|. On entry, |sig| must point to at least |EVP_PKEY_size(pkey)| bytes of space. The actual size of the signature is written to |*out_sig_len|.

It returns one on success and zero otherwise.

It does not modify |ctx|, thus it's possible to continue to use |ctx| in order to sign a longer message. It also does not mutate |pkey| for thread-safety purposes and may be used concurrently with other non-mutating functions on |pkey|.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<EVP_MD_CTX>,
    ffi.Pointer<ffi.Uint8>,
    ffi.Pointer<ffi.UnsignedInt>,
    ffi.Pointer<EVP_PKEY>,
  )
>(symbol: 'bssl_dart_EVP_SignFinal')
external int EVP_SignFinal(
  ffi.Pointer<EVP_MD_CTX> ctx,
  ffi.Pointer<ffi.Uint8> sig,
  ffi.Pointer<ffi.UnsignedInt> out_sig_len,
  ffi.Pointer<EVP_PKEY> pkey,
);