blob: 6fba8cb402fdc5e2aa28340548bf1d3524eca822 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef MD5_H
2#define MD5_H
3#ifndef HEADER_MD5_H
4/* Try to avoid clashes with OpenSSL */
5#define HEADER_MD5_H
6#endif
7
8struct MD5Context {
9 __u32 buf[4];
10 __u32 bits[2];
11 unsigned char in[64];
12};
13#endif /* !MD5_H */
14
15#ifndef _HMAC_MD5_H
16struct HMACMD5Context {
17 struct MD5Context ctx;
18 unsigned char k_ipad[65];
19 unsigned char k_opad[65];
20};
21#endif /* _HMAC_MD5_H */
22
Steve French6a7f8d32009-01-12 21:03:25 +000023void cifs_MD5_init(struct MD5Context *context);
24void cifs_MD5_update(struct MD5Context *context, unsigned char const *buf,
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 unsigned len);
Steve French6a7f8d32009-01-12 21:03:25 +000026void cifs_MD5_final(unsigned char digest[16], struct MD5Context *context);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
28/* The following definitions come from lib/hmacmd5.c */
29
Steve French2cd646a2006-09-28 19:43:08 +000030/* void hmac_md5_init_rfc2104(unsigned char *key, int key_len,
31 struct HMACMD5Context *ctx);*/
Linus Torvalds1da177e2005-04-16 15:20:36 -070032void hmac_md5_init_limK_to_64(const unsigned char *key, int key_len,
33 struct HMACMD5Context *ctx);
34void hmac_md5_update(const unsigned char *text, int text_len,
35 struct HMACMD5Context *ctx);
36void hmac_md5_final(unsigned char *digest, struct HMACMD5Context *ctx);
Steve French2cd646a2006-09-28 19:43:08 +000037/* void hmac_md5(unsigned char key[16], unsigned char *data, int data_len,
38 unsigned char *digest);*/