diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-10-26 16:07:45 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-11-02 17:53:22 +0100 |
commit | 390601f038b69d5de3841c691f92af0fcd088454 (patch) | |
tree | 2b4eaa32636dd33d1e556e177bd29b40c16dfcd0 /lib/mac.h | |
parent | 64385aee0cc2dfae8297f29ce6724cedf7cc4736 (diff) |
RIP: Use message authentication interface
Based on former commit from Pavel Tvrdik
Diffstat (limited to 'lib/mac.h')
-rw-r--r-- | lib/mac.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -21,6 +21,7 @@ #define ALG_SHA256 0x04 #define ALG_SHA384 0x05 #define ALG_SHA512 0x06 +#define ALG_HMAC 0x10 #define ALG_HMAC_MD5 0x11 #define ALG_HMAC_SHA1 0x12 #define ALG_HMAC_SHA224 0x13 @@ -34,6 +35,9 @@ #define HASH_STORAGE sizeof(struct sha512_context) #define MAC_STORAGE sizeof(struct hmac_context) +/* This value is used by several IETF protocols for padding */ +#define HMAC_MAGIC htonl(0x878FE1F3) + /* Generic context used by hash functions */ struct hash_context { |