diff options
| author | Michael Brown | 2007-02-01 06:48:56 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-02-01 06:48:56 +0100 |
| commit | cc8f9e4b7fa6a82415c2f13d4434b379ef760bcb (patch) | |
| tree | ece501e37b08aefc978204a1d6b78c488305636f /src/include | |
| parent | Vanilla copies from axtls (diff) | |
| download | ipxe-cc8f9e4b7fa6a82415c2f13d4434b379ef760bcb.tar.gz ipxe-cc8f9e4b7fa6a82415c2f13d4434b379ef760bcb.tar.xz ipxe-cc8f9e4b7fa6a82415c2f13d4434b379ef760bcb.zip | |
Make context sizes available for statically-allocated structures
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/md5.h | 14 | ||||
| -rw-r--r-- | src/include/gpxe/sha1.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/include/gpxe/md5.h b/src/include/gpxe/md5.h index f82c94625..304a0e646 100644 --- a/src/include/gpxe/md5.h +++ b/src/include/gpxe/md5.h @@ -3,6 +3,20 @@ struct crypto_algorithm; +#include <stdint.h> + +#define MD5_DIGEST_SIZE 16 +#define MD5_BLOCK_WORDS 16 +#define MD5_HASH_WORDS 4 + +struct md5_ctx { + u32 hash[MD5_HASH_WORDS]; + u32 block[MD5_BLOCK_WORDS]; + u64 byte_count; +}; + +#define MD5_CTX_SIZE sizeof ( struct md5_ctx ) + extern struct crypto_algorithm md5_algorithm; #endif /* _GPXE_MD5_H */ diff --git a/src/include/gpxe/sha1.h b/src/include/gpxe/sha1.h index 1425d54cf..0a811018c 100644 --- a/src/include/gpxe/sha1.h +++ b/src/include/gpxe/sha1.h @@ -1,8 +1,12 @@ #ifndef _GPXE_SHA1_H #define _GPXE_SHA1_H +#include "crypto/axtls/crypto.h" + struct crypto_algorithm; +#define SHA1_CTX_SIZE sizeof ( SHA1_CTX ) + extern struct crypto_algorithm sha1_algorithm; #endif /* _GPXE_SHA1_H */ |
