diff options
author | sam <sam@FreeBSD.org> | 2006-03-07 05:47:04 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-03-07 05:47:04 +0000 |
commit | 8d55057fb42bf9070fd379acbcb6fc4ef793d2a7 (patch) | |
tree | dacc7977efdefefb8b105113edeb5215c0e01234 /contrib/hostapd/md5.h | |
parent | d1a1fd4aa94cd9c5cb443c4c1337f91c8c46fde0 (diff) | |
download | FreeBSD-src-8d55057fb42bf9070fd379acbcb6fc4ef793d2a7.zip FreeBSD-src-8d55057fb42bf9070fd379acbcb6fc4ef793d2a7.tar.gz |
Import of hostapd 0.4.8
Diffstat (limited to 'contrib/hostapd/md5.h')
-rw-r--r-- | contrib/hostapd/md5.h | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/contrib/hostapd/md5.h b/contrib/hostapd/md5.h index cc3eb95..a724804 100644 --- a/contrib/hostapd/md5.h +++ b/contrib/hostapd/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, |