1 /* 2 * SPDX-FileCopyrightText: 2003-2005, Jouni Malinen <j@w1.fi> 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 /* 7 * MD5 internal definitions 8 * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi> 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License version 2 as 12 * published by the Free Software Foundation. 13 * 14 * Alternatively, this software may be distributed under the terms of BSD 15 * license. 16 * 17 * See README and COPYING for more details. 18 */ 19 20 #ifndef _ROM_MD5_HASH_H_ 21 #define _ROM_MD5_HASH_H_ 22 23 #include <stdint.h> 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 struct MD5Context { 30 uint32_t buf[4]; 31 uint32_t bits[2]; 32 uint8_t in[64]; 33 }; 34 35 void MD5Init(struct MD5Context *context); 36 void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); 37 void MD5Final(unsigned char digest[16], struct MD5Context *context); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* _ROM_MD5_HASH_H_ */ 44