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 748B

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