ngtcp2_crypto_aead_ctx_encrypt_init

Synopsis

#include <ngtcp2/ngtcp2_crypto.h>

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

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

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