BN_bn2bin_padded function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<Uint8>, Size, Pointer<BIGNUM>)>(ffi.Pointer<ffi.Uint8>, ffi.Size, ffi.Pointer<BIGNUM>)>(symbol: 'bssl_dart_BN_bn2bin_padded')
int BN_bn2bin_padded(
  1. Pointer<Uint8> out,
  2. int len,
  3. Pointer<BIGNUM> in$
)

BN_bn2bin_padded serialises the absolute value of |in| to |out| as a big-endian integer. The integer is padded with leading zeros up to size |len|. If |len| is smaller than |BN_num_bytes|, the function fails and returns 0. Otherwise, it returns 1.

Implementation

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