diff options
author | Florian Fainelli <florian@openwrt.org> | 2008-07-15 17:12:30 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2008-07-15 17:12:30 +0000 |
commit | 3b32c2289303f77c47def82b726f81fe095b3b46 (patch) | |
tree | 8d0236fd849c0a024330fa14d094a5ae33f571d9 /package/ubsec_ssb/src/hmachack.h | |
parent | 52a313e5bf0c34e763bbbcbcd68bf547700dff96 (diff) | |
download | mtk-20170518-3b32c2289303f77c47def82b726f81fe095b3b46.zip mtk-20170518-3b32c2289303f77c47def82b726f81fe095b3b46.tar.gz mtk-20170518-3b32c2289303f77c47def82b726f81fe095b3b46.tar.bz2 |
Add ubsec ssb from Daniel Mueller <daniel@danm.de> (#2417)
SVN-Revision: 11841
Diffstat (limited to 'package/ubsec_ssb/src/hmachack.h')
-rw-r--r-- | package/ubsec_ssb/src/hmachack.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/ubsec_ssb/src/hmachack.h b/package/ubsec_ssb/src/hmachack.h new file mode 100644 index 0000000..f567958 --- /dev/null +++ b/package/ubsec_ssb/src/hmachack.h @@ -0,0 +1,38 @@ +/* + * until we find a cleaner way, include the BSD md5/sha1 code + * here + */ +#define HMAC_HACK 1 +#ifdef HMAC_HACK +#define LITTLE_ENDIAN 1234 +#define BIG_ENDIAN 4321 +#ifdef __LITTLE_ENDIAN +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#ifdef __BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#endif + +u_int8_t hmac_ipad_buffer[64] = { + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 +}; + +u_int8_t hmac_opad_buffer[64] = { + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, + 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C +}; +#endif /* HMAC_HACK */ + |