1MDC2_INIT(3)                        OpenSSL                       MDC2_INIT(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:2000 Hash-Function 2, with DES as the underlying block
49       cipher.
50

SEE ALSO

52       EVP_DigestInit(3)
53
55       Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
56
57       Licensed under the OpenSSL license (the "License").  You may not use
58       this file except in compliance with the License.  You can obtain a copy
59       in the file LICENSE in the source distribution or at
60       <https://www.openssl.org/source/license.html>.
61
62
63
641.1.1                             2018-09-11                      MDC2_INIT(3)
Impressum