1mdc2(3)                             OpenSSL                            mdc2(3)
2
3
4

NAME

6       MDC2, MDC2_Init, MDC2_Update, MDC2_Final - MDC2 hash function
7

SYNOPSIS

9        #include <openssl/mdc2.h>
10
11        unsigned char *MDC2(const unsigned char *d, unsigned long n,
12                         unsigned char *md);
13
14        int MDC2_Init(MDC2_CTX *c);
15        int MDC2_Update(MDC2_CTX *c, const unsigned char *data,
16                         unsigned long len);
17        int MDC2_Final(unsigned char *md, MDC2_CTX *c);
18

DESCRIPTION

20       MDC2 is a method to construct hash functions with 128 bit output from
21       block ciphers.  These functions are an implementation of MDC2 with DES.
22
23       MDC2() computes the MDC2 message digest of the n bytes at d and places
24       it in md (which must have space for MDC2_DIGEST_LENGTH == 16 bytes of
25       output). If md is NULL, the digest is placed in a static array.
26
27       The following functions may be used if the message is not completely
28       stored in memory:
29
30       MDC2_Init() initializes a MDC2_CTX structure.
31
32       MDC2_Update() can be called repeatedly with chunks of the message to be
33       hashed (len bytes at data).
34
35       MDC2_Final() places the message digest in md, which must have space for
36       MDC2_DIGEST_LENGTH == 16 bytes of output, and erases the MDC2_CTX.
37
38       Applications should use the higher level functions EVP_DigestInit(3)
39       etc. instead of calling the hash functions directly.
40

RETURN VALUES

42       MDC2() returns a pointer to the hash value.
43
44       MDC2_Init(), MDC2_Update() and MDC2_Final() return 1 for success, 0
45       otherwise.
46

CONFORMING TO

48       ISO/IEC 10118-2, with DES
49

SEE ALSO

51       sha(3), EVP_DigestInit(3)
52

HISTORY

54       MDC2(), MDC2_Init(), MDC2_Update() and MDC2_Final() are available since
55       SSLeay 0.8.
56
57
58
591.0.2o                            2020-01-28                           mdc2(3)
Impressum