1 /** @file md5.h 2 * 3 * @brief This file contains define for md5. 4 * 5 * Copyright (C) 2014-2017, Marvell International Ltd. 6 * 7 * This software file (the "File") is distributed by Marvell International 8 * Ltd. under the terms of the GNU General Public License Version 2, June 1991 9 * (the "License"). You may use, redistribute and/or modify this File in 10 * accordance with the terms and conditions of the License, a copy of which 11 * is available by writing to the Free Software Foundation, Inc., 12 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 13 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 14 * 15 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 17 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 18 * this warranty disclaimer. 19 */ 20 21 /****************************************************** 22 Change log: 23 03/07/2014: Initial version 24 ******************************************************/ 25 #ifndef _MD5_H_ 26 #define _MD5_H_ 27 28 typedef struct { 29 unsigned int state[4]; /* state (ABCD) */ 30 unsigned int count[2]; /* number of bits, modulo 2^64 (lsb first) */ 31 unsigned int scratch[16]; /* This is used to reduce the memory 32 ** requirements of the transform 33 ** function 34 */ 35 unsigned char buffer[64]; /* input buffer */ 36 } Mrvl_MD5_CTX; 37 38 void wpa_MD5Init(Mrvl_MD5_CTX *context); 39 void wpa_MD5Update(void *priv, Mrvl_MD5_CTX *context, UINT8 *input, 40 UINT32 inputLen); 41 void wpa_MD5Final(void *priv, unsigned char digest[16], Mrvl_MD5_CTX *context); 42 void Mrvl_hmac_md5(void *priv, UINT8 *text, int text_len, UINT8 *key, 43 int key_len, void *digest); 44 45 #endif 46