diff options
author | Sebastian Schmelzer | 2010-10-25 16:53:54 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2010-10-25 16:53:54 +0200 |
commit | 3050a9253437f4a4b5ad4bf3b3efdc3c660a5137 (patch) | |
tree | 91ac22153e416aac7ca20916b314b5e2ffa871b1 /contrib/syslinux-4.02/gpxe/src/include/gpxe/hmac.h | |
download | preboot-3050a9253437f4a4b5ad4bf3b3efdc3c660a5137.tar.gz preboot-3050a9253437f4a4b5ad4bf3b3efdc3c660a5137.tar.xz preboot-3050a9253437f4a4b5ad4bf3b3efdc3c660a5137.zip |
Diffstat (limited to 'contrib/syslinux-4.02/gpxe/src/include/gpxe/hmac.h')
-rw-r--r-- | contrib/syslinux-4.02/gpxe/src/include/gpxe/hmac.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/gpxe/src/include/gpxe/hmac.h b/contrib/syslinux-4.02/gpxe/src/include/gpxe/hmac.h new file mode 100644 index 0000000..cb001b9 --- /dev/null +++ b/contrib/syslinux-4.02/gpxe/src/include/gpxe/hmac.h @@ -0,0 +1,32 @@ +#ifndef _GPXE_HMAC_H +#define _GPXE_HMAC_H + +/** @file + * + * Keyed-Hashing for Message Authentication + */ + +FILE_LICENCE ( GPL2_OR_LATER ); + +#include <gpxe/crypto.h> + +/** + * Update HMAC + * + * @v digest Digest algorithm to use + * @v digest_ctx Digest context + * @v data Data + * @v len Length of data + */ +static inline void hmac_update ( struct digest_algorithm *digest, + void *digest_ctx, const void *data, + size_t len ) { + digest_update ( digest, digest_ctx, data, len ); +} + +extern void hmac_init ( struct digest_algorithm *digest, void *digest_ctx, + void *key, size_t *key_len ); +extern void hmac_final ( struct digest_algorithm *digest, void *digest_ctx, + void *key, size_t *key_len, void *hmac ); + +#endif /* _GPXE_HMAC_H */ |