diff options
author | Sam Leffler <sam@FreeBSD.org> | 2006-03-07 05:26:33 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2006-03-07 05:26:33 +0000 |
commit | 4e0922e888407f6dd91546a040e26125317fcfd8 (patch) | |
tree | 0c0ff34569d807e7bceb062a6210ce68490a8764 /contrib/wpa_supplicant/md5.h | |
parent | e00d94fa7cb16ece7a61c444a75fef8ff3926446 (diff) | |
download | src-4e0922e888407f6dd91546a040e26125317fcfd8.tar.gz src-4e0922e888407f6dd91546a040e26125317fcfd8.zip |
Import of WPA supplicant 0.4.8
Notes
Notes:
svn path=/vendor/wpa_supplicant/dist/; revision=156369
Diffstat (limited to 'contrib/wpa_supplicant/md5.h')
-rw-r--r-- | contrib/wpa_supplicant/md5.h | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/contrib/wpa_supplicant/md5.h b/contrib/wpa_supplicant/md5.h index cc3eb950b507..a724804943fc 100644 --- a/contrib/wpa_supplicant/md5.h +++ b/contrib/wpa_supplicant/md5.h @@ -1,40 +1,22 @@ +/* + * MD5 hash implementation and interface functions + * Copyright (c) 2003-2005, Jouni Malinen <jkmaline@cc.hut.fi> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Alternatively, this software may be distributed under the terms of BSD + * license. + * + * See README and COPYING for more details. + */ + #ifndef MD5_H #define MD5_H -#ifdef EAP_TLS_FUNCS - -#include <openssl/md5.h> - -#define MD5Init MD5_Init -#define MD5Update MD5_Update -#define MD5Final MD5_Final -#define MD5Transform MD5_Transform - -#define MD5_MAC_LEN MD5_DIGEST_LENGTH - -#else /* EAP_TLS_FUNCS */ - #define MD5_MAC_LEN 16 -struct MD5Context { - u32 buf[4]; - u32 bits[2]; - u8 in[64]; -}; - -void MD5Init(struct MD5Context *context); -void MD5Update(struct MD5Context *context, unsigned char const *buf, - unsigned len); -void MD5Final(unsigned char digest[16], struct MD5Context *context); -void MD5Transform(u32 buf[4], u32 const in[16]); - -typedef struct MD5Context MD5_CTX; - -#endif /* EAP_TLS_FUNCS */ - - -void md5_mac(const u8 *key, size_t key_len, const u8 *data, size_t data_len, - u8 *mac); void hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); void hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, |