hmac-sha1.h 447 B

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