1md5(3)                              OpenSSL                             md5(3)
2
3
4

NAME

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

SYNOPSIS

11        #include <openssl/md2.h>
12
13        unsigned char *MD2(const unsigned char *d, unsigned long n,
14                         unsigned char *md);
15
16        int MD2_Init(MD2_CTX *c);
17        int MD2_Update(MD2_CTX *c, const unsigned char *data,
18                         unsigned long len);
19        int MD2_Final(unsigned char *md, MD2_CTX *c);
20
21
22        #include <openssl/md4.h>
23
24        unsigned char *MD4(const unsigned char *d, unsigned long n,
25                         unsigned char *md);
26
27        int MD4_Init(MD4_CTX *c);
28        int MD4_Update(MD4_CTX *c, const void *data,
29                         unsigned long len);
30        int MD4_Final(unsigned char *md, MD4_CTX *c);
31
32
33        #include <openssl/md5.h>
34
35        unsigned char *MD5(const unsigned char *d, unsigned long n,
36                         unsigned char *md);
37
38        int MD5_Init(MD5_CTX *c);
39        int MD5_Update(MD5_CTX *c, const void *data,
40                         unsigned long len);
41        int MD5_Final(unsigned char *md, MD5_CTX *c);
42

DESCRIPTION

44       MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit
45       output.
46
47       MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest of
48       the n bytes at d and place it in md (which must have space for
49       MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 bytes
50       of output). If md is NULL, the digest is placed in a static array.
51
52       The following functions may be used if the message is not completely
53       stored in memory:
54
55       MD2_Init() initializes a MD2_CTX structure.
56
57       MD2_Update() can be called repeatedly with chunks of the message to be
58       hashed (len bytes at data).
59
60       MD2_Final() places the message digest in md, which must have space for
61       MD2_DIGEST_LENGTH == 16 bytes of output, and erases the MD2_CTX.
62
63       MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
64       MD5_Final() are analogous using an MD4_CTX and MD5_CTX structure.
65
66       Applications should use the higher level functions EVP_DigestInit(3)
67       etc. instead of calling the hash functions directly.
68

NOTE

70       MD2, MD4, and MD5 are recommended only for compatibility with existing
71       applications. In new applications, SHA-1 or RIPEMD-160 should be
72       preferred.
73

RETURN VALUES

75       MD2(), MD4(), and MD5() return pointers to the hash value.
76
77       MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
78       MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
79       success, 0 otherwise.
80

CONFORMING TO

82       RFC 1319, RFC 1320, RFC 1321
83

SEE ALSO

85       sha(3), ripemd(3), EVP_DigestInit(3)
86

HISTORY

88       MD2(), MD2_Init(), MD2_Update() MD2_Final(), MD5(), MD5_Init(),
89       MD5_Update() and MD5_Final() are available in all versions of SSLeay
90       and OpenSSL.
91
92       MD4(), MD4_Init(), and MD4_Update() are available in OpenSSL 0.9.6 and
93       above.
94
95
96
971.0.0e                            2006-10-27                            md5(3)
Impressum