1md5(3) OpenSSL md5(3)
2
3
4
6 MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update,
7 MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash
8 functions
9
11 #include <openssl/md2.h>
12
13 unsigned char *MD2(const unsigned char *d, unsigned long n,
14 unsigned char *md);
15
16 void MD2_Init(MD2_CTX *c);
17 void MD2_Update(MD2_CTX *c, const unsigned char *data,
18 unsigned long len);
19 void MD2_Final(unsigned char *md, MD2_CTX *c);
20
21 #include <openssl/md4.h>
22
23 unsigned char *MD4(const unsigned char *d, unsigned long n,
24 unsigned char *md);
25
26 void MD4_Init(MD4_CTX *c);
27 void MD4_Update(MD4_CTX *c, const void *data,
28 unsigned long len);
29 void MD4_Final(unsigned char *md, MD4_CTX *c);
30
31 #include <openssl/md5.h>
32
33 unsigned char *MD5(const unsigned char *d, unsigned long n,
34 unsigned char *md);
35
36 void MD5_Init(MD5_CTX *c);
37 void MD5_Update(MD5_CTX *c, const void *data,
38 unsigned long len);
39 void MD5_Final(unsigned char *md, MD5_CTX *c);
40
42 MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit out‐
43 put.
44
45 MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest of
46 the n bytes at d and place it in md (which must have space for
47 MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 bytes
48 of output). If md is NULL, the digest is placed in a static array.
49
50 The following functions may be used if the message is not completely
51 stored in memory:
52
53 MD2_Init() initializes a MD2_CTX structure.
54
55 MD2_Update() can be called repeatedly with chunks of the message to be
56 hashed (len bytes at data).
57
58 MD2_Final() places the message digest in md, which must have space for
59 MD2_DIGEST_LENGTH == 16 bytes of output, and erases the MD2_CTX.
60
61 MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
62 MD5_Final() are analogous using an MD4_CTX and MD5_CTX structure.
63
64 Applications should use the higher level functions EVP_DigestInit(3)
65 etc. instead of calling the hash functions directly.
66
68 MD2, MD4, and MD5 are recommended only for compatibility with existing
69 applications. In new applications, SHA-1 or RIPEMD-160 should be pre‐
70 ferred.
71
73 MD2(), MD4(), and MD5() return pointers to the hash value.
74
75 MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
76 MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() do not return
77 values.
78
80 RFC 1319, RFC 1320, RFC 1321
81
83 sha(3), ripemd(3), EVP_DigestInit(3)
84
86 MD2(), MD2_Init(), MD2_Update() MD2_Final(), MD5(), MD5_Init(),
87 MD5_Update() and MD5_Final() are available in all versions of SSLeay
88 and OpenSSL.
89
90 MD4(), MD4_Init(), and MD4_Update() are available in OpenSSL 0.9.6 and
91 above.
92
93
94
950.9.8b 2000-08-14 md5(3)