#include <ngtcp2/ngtcp2_crypto.h>

int ngtcp2_crypto_generate_stateless_reset_token(uint8_t *token, const uint8_t *secret, size_t secretlen, const ngtcp2_cid *cid)

ngtcp2_crypto_generate_stateless_reset_token() generates a stateless reset token using HKDF extraction using the given cid and secret as input. The token will be written to the buffer pointed by token, and it must have a capacity of at least NGTCP2_STATELESS_RESET_TOKENLEN bytes.

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