ASN1_BIT_STRING_set1 function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<ASN1_OCTET_STRING>, Pointer<Uint8>, Size, Int)>(ffi.Pointer<ASN1_BIT_STRING>, ffi.Pointer<ffi.Uint8>, ffi.Size, ffi.Int)>(symbol: 'bssl_dart_ASN1_BIT_STRING_set1')
int ASN1_BIT_STRING_set1(
  1. Pointer<ASN1_OCTET_STRING> str,
  2. Pointer<Uint8> data,
  3. int length,
  4. int unused_bits,
)

ASN1_BIT_STRING_set1 sets str to a BIT STRING containing length bytes from data. It returns one on success and zero on error. The least significant unused_bits of the last byte of data are removed from the bit string. The removed bits must all be zero. unused_bits must be between 0 and 7, and must be 0 if length is zero.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<ASN1_BIT_STRING>,
    ffi.Pointer<ffi.Uint8>,
    ffi.Size,
    ffi.Int,
  )
>(symbol: 'bssl_dart_ASN1_BIT_STRING_set1')
external int ASN1_BIT_STRING_set1(
  ffi.Pointer<ASN1_BIT_STRING> str,
  ffi.Pointer<ffi.Uint8> data,
  int length,
  int unused_bits,
);