OLD | NEW |
1 /* crypto/md/md2.h */ | 1 /* crypto/md/md2.h */ |
2 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #endif | 65 #endif |
66 #include <stddef.h> | 66 #include <stddef.h> |
67 | 67 |
68 #define MD2_DIGEST_LENGTH 16 | 68 #define MD2_DIGEST_LENGTH 16 |
69 #define MD2_BLOCK 16 | 69 #define MD2_BLOCK 16 |
70 | 70 |
71 #ifdef __cplusplus | 71 #ifdef __cplusplus |
72 extern "C" { | 72 extern "C" { |
73 #endif | 73 #endif |
74 | 74 |
75 #include <stddef.h> | |
76 | |
77 typedef struct MD2state_st | 75 typedef struct MD2state_st |
78 { | 76 { |
79 unsigned int num; | 77 unsigned int num; |
80 unsigned char data[MD2_BLOCK]; | 78 unsigned char data[MD2_BLOCK]; |
81 MD2_INT cksm[MD2_BLOCK]; | 79 MD2_INT cksm[MD2_BLOCK]; |
82 MD2_INT state[MD2_BLOCK]; | 80 MD2_INT state[MD2_BLOCK]; |
83 } MD2_CTX; | 81 } MD2_CTX; |
84 | 82 |
85 const char *MD2_options(void); | 83 const char *MD2_options(void); |
86 #ifdef OPENSSL_FIPS | |
87 int private_MD2_Init(MD2_CTX *c); | |
88 #endif | |
89 int MD2_Init(MD2_CTX *c); | 84 int MD2_Init(MD2_CTX *c); |
90 int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); | 85 int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); |
91 int MD2_Final(unsigned char *md, MD2_CTX *c); | 86 int MD2_Final(unsigned char *md, MD2_CTX *c); |
92 unsigned char *MD2(const unsigned char *d, size_t n,unsigned char *md); | 87 unsigned char *MD2(const unsigned char *d, size_t n,unsigned char *md); |
93 #ifdef __cplusplus | 88 #ifdef __cplusplus |
94 } | 89 } |
95 #endif | 90 #endif |
96 | 91 |
97 #endif | 92 #endif |
OLD | NEW |