hmac-sha256.h 459 B

1234567891011121314
  1. #ifndef HMAC_SHA256_H
  2. #define HMAC_SHA256_H
  3. #include <stddef.h>
  4. #define HMAC_SHA256_RESULT_SIZE 32
  5. /* Compute Hashed Message Authentication Code with SHA-256, over BUFFER
  6. data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the
  7. output to pre-allocated 32 byte minimum RESBUF buffer. Return 0 on
  8. success. */
  9. int hmac_sha256 (const void *key, size_t keylen, const void *in, size_t inlen, void *restrict resbuf);
  10. #endif /* HMAC_SHA256_H */