]> git.ipfire.org Git - thirdparty/openssl.git/blame - include/openssl/mdc2.h
Following the license change, modify the boilerplates in include/ and crypto/include/
[thirdparty/openssl.git] / include / openssl / mdc2.h
CommitLineData
21dcbebc
RS
1/*
2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
d02b48c6 3 *
48f4ad77 4 * Licensed under the Apache License 2.0 (the "License"). You may not use
21dcbebc
RS
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
d02b48c6
RE
8 */
9
10#ifndef HEADER_MDC2_H
0f113f3e 11# define HEADER_MDC2_H
d02b48c6 12
3c27208f 13# include <openssl/opensslconf.h>
82271cee 14
3c27208f 15#ifndef OPENSSL_NO_MDC2
2d5724aa 16# include <stdlib.h>
3c27208f
RS
17# include <openssl/des.h>
18# ifdef __cplusplus
d02b48c6 19extern "C" {
0f113f3e 20# endif
f5d7a031 21
0f113f3e
MC
22# define MDC2_BLOCK 8
23# define MDC2_DIGEST_LENGTH 16
d02b48c6 24
0f113f3e
MC
25typedef struct mdc2_ctx_st {
26 unsigned int num;
27 unsigned char data[MDC2_BLOCK];
28 DES_cblock h, hh;
29 int pad_type; /* either 1 or 2, default 1 */
30} MDC2_CTX;
d02b48c6 31
2dc769a1 32int MDC2_Init(MDC2_CTX *c);
9e0aad9f 33int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);
2dc769a1 34int MDC2_Final(unsigned char *md, MDC2_CTX *c);
0f113f3e 35unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md);
d02b48c6 36
3c27208f 37# ifdef __cplusplus
d02b48c6 38}
3c27208f
RS
39# endif
40# endif
d02b48c6
RE
41
42#endif