AES_wrap_key_padded function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<AES_KEY>, Pointer<Uint8>, Pointer<Size>, Size, Pointer<Uint8>, Size)>(ffi.Pointer<AES_KEY>, ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.Size>, ffi.Size, ffi.Pointer<ffi.Uint8>, ffi.Size)>(symbol: 'bssl_dart_AES_wrap_key_padded')
int AES_wrap_key_padded(
  1. Pointer<AES_KEY> key,
  2. Pointer<Uint8> out,
  3. Pointer<Size> out_len,
  4. int max_out,
  5. Pointer<Uint8> in$,
  6. int in_len,
)

AES_wrap_key_padded performs a padded AES key wrap on |in| which must be between 1 and 2^32-1 bytes. |key| must have been configured for encryption. On success it writes at most |max_out| bytes of ciphertext to |out|, sets |*out_len| to the number of bytes written, and returns one. On failure it returns zero. To ensure success, set |max_out| to at least |in_len| + 15.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<AES_KEY>,
    ffi.Pointer<ffi.Uint8>,
    ffi.Pointer<ffi.Size>,
    ffi.Size,
    ffi.Pointer<ffi.Uint8>,
    ffi.Size,
  )
>(symbol: 'bssl_dart_AES_wrap_key_padded')
external int AES_wrap_key_padded(
  ffi.Pointer<AES_KEY> key,
  ffi.Pointer<ffi.Uint8> out,
  ffi.Pointer<ffi.Size> out_len,
  int max_out,
  ffi.Pointer<ffi.Uint8> in$,
  int in_len,
);