]> git.ipfire.org Git - thirdparty/openssl.git/blame - include/openssl/md2.h
Check DSA parameters for excessive sizes before validating
[thirdparty/openssl.git] / include / openssl / md2.h
CommitLineData
21dcbebc 1/*
33388b44 2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
58964a49 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
58964a49
RE
8 */
9
ae4186b0
DMSP
10#ifndef OPENSSL_MD2_H
11# define OPENSSL_MD2_H
d86167ec
DMSP
12# pragma once
13
14# include <openssl/macros.h>
936c2b9e 15# ifndef OPENSSL_NO_DEPRECATED_3_0
d86167ec
DMSP
16# define HEADER_MD2_H
17# endif
58964a49 18
3e9e810f 19# include <openssl/opensslconf.h>
3c27208f
RS
20
21# ifndef OPENSSL_NO_MD2
b2be1ea2
P
22# include <stddef.h>
23# ifdef __cplusplus
3c27208f 24extern "C" {
b2be1ea2 25# endif
f5d7a031 26
58e1f3d6
P
27# define MD2_DIGEST_LENGTH 16
28
29# if !defined(OPENSSL_NO_DEPRECATED_3_0)
30
3444c36a 31typedef unsigned char MD2_INT;
3e9e810f 32
58e1f3d6 33# define MD2_BLOCK 16
58964a49 34
0f113f3e
MC
35typedef struct MD2state_st {
36 unsigned int num;
37 unsigned char data[MD2_BLOCK];
38 MD2_INT cksm[MD2_BLOCK];
39 MD2_INT state[MD2_BLOCK];
40} MD2_CTX;
58e1f3d6 41# endif
0c5f7284
RL
42# ifndef OPENSSL_NO_DEPRECATED_3_0
43OSSL_DEPRECATEDIN_3_0 const char *MD2_options(void);
44OSSL_DEPRECATEDIN_3_0 int MD2_Init(MD2_CTX *c);
45OSSL_DEPRECATEDIN_3_0 int MD2_Update(MD2_CTX *c, const unsigned char *data,
46 size_t len);
47OSSL_DEPRECATEDIN_3_0 int MD2_Final(unsigned char *md, MD2_CTX *c);
48OSSL_DEPRECATEDIN_3_0 unsigned char *MD2(const unsigned char *d, size_t n,
49 unsigned char *md);
50# endif
3c27208f 51
b2be1ea2 52# ifdef __cplusplus
58964a49 53}
b2be1ea2 54# endif
3c27208f 55# endif
58964a49 56#endif