BN_bn2bin function

  1. @RecordUse.new()
  2. @Native<Size Function(Pointer<BIGNUM>, Pointer<Uint8>)>(ffi.Pointer<BIGNUM>, ffi.Pointer<ffi.Uint8>)>(symbol: 'bssl_dart_BN_bn2bin')
int BN_bn2bin(
  1. Pointer<BIGNUM> in$,
  2. Pointer<Uint8> out
)

BN_bn2bin serialises the absolute value of |in| to |out| as a big-endian integer, which must have |BN_num_bytes| of space available. It returns the number of bytes written. Note this function leaks the magnitude of |in|. If |in| is secret, use |BN_bn2bin_padded| instead.

Implementation

@meta.RecordUse()
@ffi.Native<ffi.Size Function(ffi.Pointer<BIGNUM>, ffi.Pointer<ffi.Uint8>)>(
  symbol: 'bssl_dart_BN_bn2bin',
)
external int BN_bn2bin(
  ffi.Pointer<BIGNUM> in$,
  ffi.Pointer<ffi.Uint8> out,
);