pub unsafe extern "C" fn EverCrypt_AEAD_create_in(
a: Spec_Agile_AEAD_alg,
dst: *mut *mut EverCrypt_AEAD_state_s,
k: *mut u8,
) -> EverCrypt_Error_error_code
Expand description
Create the required AEAD state for the algorithm.
Note: The caller must free the AEAD state by calling EverCrypt_AEAD_free
.
@param a The argument a
must be either of:
Spec_Agile_AEAD_AES128_GCM
(KEY_LEN=16),
Spec_Agile_AEAD_AES256_GCM
(KEY_LEN=32), or
Spec_Agile_AEAD_CHACHA20_POLY1305
(KEY_LEN=32).
@param dst Pointer to a pointer where the address of the allocated AEAD state will be written to.
@param k Pointer to KEY_LEN
bytes of memory where the key is read from. The size depends on the used algorithm, see above.
@return The function returns EverCrypt_Error_Success
on success or
EverCrypt_Error_UnsupportedAlgorithm
in case of a bad algorithm identifier.
(See EverCrypt_Error.h
.)