You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hmac.h 707B

123456789101112131415161718192021222324252627282930
  1. #ifndef _GPXE_HMAC_H
  2. #define _GPXE_HMAC_H
  3. /** @file
  4. *
  5. * Keyed-Hashing for Message Authentication
  6. */
  7. #include <gpxe/crypto.h>
  8. /**
  9. * Update HMAC
  10. *
  11. * @v digest Digest algorithm to use
  12. * @v digest_ctx Digest context
  13. * @v data Data
  14. * @v len Length of data
  15. */
  16. static inline void hmac_update ( struct crypto_algorithm *digest,
  17. void *digest_ctx, const void *data,
  18. size_t len ) {
  19. digest_update ( digest, digest_ctx, data, len );
  20. }
  21. extern void hmac_init ( struct crypto_algorithm *digest, void *digest_ctx,
  22. void *key, size_t *key_len );
  23. extern void hmac_final ( struct crypto_algorithm *digest, void *digest_ctx,
  24. void *key, size_t *key_len, void *hmac );
  25. #endif /* _GPXE_HMAC_H */