EVP_DecryptUpdate function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<EVP_CIPHER_CTX>, Pointer<Uint8>, Pointer<Int>, Pointer<Uint8>, Int)>(ffi.Pointer<EVP_CIPHER_CTX>, ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Uint8>, ffi.Int)>(symbol: 'bssl_dart_EVP_DecryptUpdate')
int EVP_DecryptUpdate(
  1. Pointer<EVP_CIPHER_CTX> ctx,
  2. Pointer<Uint8> out,
  3. Pointer<Int> out_len,
  4. Pointer<Uint8> in$,
  5. int in_len,
)

EVP_DecryptUpdate does the same as |EVP_DecryptUpdate_ex|, except that no output size is given and thus no bounds checking is performed.

Additionally, if |ctx| is an AEAD cipher, e.g. |EVP_aes_128_gcm|, and |out| is NULL, this function instead behaves like |EVP_CipherUpdateAAD|.

WARNING: This function does not check bounds on out, and correctly sizing the output buffer is difficult. Use |EVP_DecryptUpdate_ex| or |EVP_CipherUpdateAAD| instead.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<EVP_CIPHER_CTX>,
    ffi.Pointer<ffi.Uint8>,
    ffi.Pointer<ffi.Int>,
    ffi.Pointer<ffi.Uint8>,
    ffi.Int,
  )
>(symbol: 'bssl_dart_EVP_DecryptUpdate')
external int EVP_DecryptUpdate(
  ffi.Pointer<EVP_CIPHER_CTX> ctx,
  ffi.Pointer<ffi.Uint8> out,
  ffi.Pointer<ffi.Int> out_len,
  ffi.Pointer<ffi.Uint8> in$,
  int in_len,
);