iPXE
hmac.h
Go to the documentation of this file.
1 #ifndef _IPXE_HMAC_H
2 #define _IPXE_HMAC_H
3 
4 /** @file
5  *
6  * Keyed-Hashing for Message Authentication
7  */
8 
9 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
10 
11 #include <ipxe/crypto.h>
12 
13 /**
14  * Update HMAC
15  *
16  * @v digest Digest algorithm to use
17  * @v digest_ctx Digest context
18  * @v data Data
19  * @v len Length of data
20  */
21 static inline void hmac_update ( struct digest_algorithm *digest,
22  void *digest_ctx, const void *data,
23  size_t len ) {
24  digest_update ( digest, digest_ctx, data, len );
25 }
26 
27 extern void hmac_init ( struct digest_algorithm *digest, void *digest_ctx,
28  void *key, size_t *key_len );
29 extern void hmac_final ( struct digest_algorithm *digest, void *digest_ctx,
30  void *key, size_t *key_len, void *hmac );
31 
32 #endif /* _IPXE_HMAC_H */
static void digest_update(struct digest_algorithm *digest, void *ctx, const void *data, size_t len)
Definition: crypto.h:177
Cryptographic API.
struct md4_digest digest
Digest of data already processed.
Definition: md4.h:12
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t len
Length.
Definition: ena.h:14
void hmac_init(struct digest_algorithm *digest, void *digest_ctx, void *key, size_t *key_len)
Initialise HMAC.
Definition: hmac.c:80
A message digest algorithm.
Definition: crypto.h:16
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
static void hmac_update(struct digest_algorithm *digest, void *digest_ctx, const void *data, size_t len)
Update HMAC.
Definition: hmac.h:21
union @375 key
Sense key.
Definition: scsi.h:18
void hmac_final(struct digest_algorithm *digest, void *digest_ctx, void *key, size_t *key_len, void *hmac)
Finalise HMAC.
Definition: hmac.c:115