1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _CRYPTO_MD5_H
3 #define _CRYPTO_MD5_H
4 
5 #include <crypto/hash.h>
6 #include <linux/types.h>
7 
8 #define MD5_DIGEST_SIZE		16
9 #define MD5_HMAC_BLOCK_SIZE	64
10 #define MD5_BLOCK_WORDS		16
11 #define MD5_HASH_WORDS		4
12 #define MD5_STATE_SIZE		24
13 
14 #define MD5_H0	0x67452301UL
15 #define MD5_H1	0xefcdab89UL
16 #define MD5_H2	0x98badcfeUL
17 #define MD5_H3	0x10325476UL
18 
19 #define CRYPTO_MD5_STATESIZE \
20 	CRYPTO_HASH_STATESIZE(MD5_STATE_SIZE, MD5_HMAC_BLOCK_SIZE)
21 
22 extern const u8 md5_zero_message_hash[MD5_DIGEST_SIZE];
23 
24 struct md5_state {
25 	u32 hash[MD5_HASH_WORDS];
26 	u64 byte_count;
27 	u32 block[MD5_BLOCK_WORDS];
28 };
29 
30 #endif
31