ngtcp2_crypto_hp_mask ===================== Synopsis -------- *#include * .. function:: int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp, const ngtcp2_crypto_cipher_ctx *hp_ctx, const uint8_t *sample) `ngtcp2_crypto_hp_mask` generates a mask which is used in packet header encryption. The mask is written to the buffer pointed by *dest*. The sample is passed as *sample* which is :macro:`NGTCP2_HP_SAMPLELEN` bytes long. The length of mask must be at least :macro:`NGTCP2_HP_MASKLEN`. The library only uses the first :macro:`NGTCP2_HP_MASKLEN` bytes of the produced mask. The buffer pointed by *dest* must have at least :macro:`NGTCP2_HP_SAMPLELEN` bytes available. This function returns 0 if it succeeds, or -1.