HMAC Hash API

Header File

Source: include/crypto/hmac.h

#include <crypto/hmac.h>

Functions

int HmacSHA256_encode(const unsigned char *key, unsigned int keySz, const unsigned char *data, unsigned int dlen, unsigned char hash[32])

Calculate HMAC-SHA256 Hash

Parameters:
  • key – [in] Input key

  • keySz – [in] Key size

  • data – [in] Data buffer

  • dlen – [in] Data length

  • hash – [out] Output hash buffer

Returns:

0 on success, negative value on error