#include <ngtcp2/ngtcp2_crypto.h>

int ngtcp2_crypto_aead_ctx_decrypt_init(ngtcp2_crypto_aead_ctx *aead_ctx, const ngtcp2_crypto_aead *aead, const uint8_t *key, size_t noncelen)

ngtcp2_crypto_aead_ctx_decrypt_init() initializes aead_ctx with new AEAD cipher context object for decryption which is constructed to use key as decryption key. aead specifies AEAD cipher to use. noncelen is the length of nonce.

This function returns 0 if it succeeds, or -1.