xref: /openbmc/linux/fs/smb/common/md4.h (revision 55b24334)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Common values for ARC4 Cipher Algorithm
4  */
5 
6 #ifndef _CIFS_MD4_H
7 #define _CIFS_MD4_H
8 
9 #include <linux/types.h>
10 
11 #define MD4_DIGEST_SIZE		16
12 #define MD4_HMAC_BLOCK_SIZE	64
13 #define MD4_BLOCK_WORDS		16
14 #define MD4_HASH_WORDS		4
15 
16 struct md4_ctx {
17 	u32 hash[MD4_HASH_WORDS];
18 	u32 block[MD4_BLOCK_WORDS];
19 	u64 byte_count;
20 };
21 
22 
23 int cifs_md4_init(struct md4_ctx *mctx);
24 int cifs_md4_update(struct md4_ctx *mctx, const u8 *data, unsigned int len);
25 int cifs_md4_final(struct md4_ctx *mctx, u8 *out);
26 
27 #endif /* _CIFS_MD4_H */
28