summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/mdc2
diff options
context:
space:
mode:
authormarkus <>2002-09-05 12:51:52 +0000
committermarkus <>2002-09-05 12:51:52 +0000
commit5514995a9d5ed91db089875adb509c7781357c0e (patch)
tree2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto/mdc2
parentfd9566423b542798f5c8b06e68101a9ea5bb9885 (diff)
downloadopenbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz
openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2
openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/mdc2')
-rw-r--r--src/lib/libcrypto/mdc2/mdc2.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h
index 0b104be184..793a8a0f13 100644
--- a/src/lib/libcrypto/mdc2/mdc2.h
+++ b/src/lib/libcrypto/mdc2/mdc2.h
@@ -59,11 +59,15 @@
59#ifndef HEADER_MDC2_H 59#ifndef HEADER_MDC2_H
60#define HEADER_MDC2_H 60#define HEADER_MDC2_H
61 61
62#include <openssl/des.h>
63
62#ifdef __cplusplus 64#ifdef __cplusplus
63extern "C" { 65extern "C" {
64#endif 66#endif
65 67
66#include "des.h" 68#ifdef OPENSSL_NO_MDC2
69#error MDC2 is disabled.
70#endif
67 71
68#define MDC2_BLOCK 8 72#define MDC2_BLOCK 8
69#define MDC2_DIGEST_LENGTH 16 73#define MDC2_DIGEST_LENGTH 16
@@ -72,25 +76,16 @@ typedef struct mdc2_ctx_st
72 { 76 {
73 int num; 77 int num;
74 unsigned char data[MDC2_BLOCK]; 78 unsigned char data[MDC2_BLOCK];
75 des_cblock h,hh; 79 DES_cblock h,hh;
76 int pad_type; /* either 1 or 2, default 1 */ 80 int pad_type; /* either 1 or 2, default 1 */
77 } MDC2_CTX; 81 } MDC2_CTX;
78 82
79#ifndef NOPROTO
80
81void MDC2_Init(MDC2_CTX *c);
82void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len);
83void MDC2_Final(unsigned char *md, MDC2_CTX *c);
84unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md);
85 83
86#else 84int MDC2_Init(MDC2_CTX *c);
87 85int MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len);
88void MDC2_Init(); 86int MDC2_Final(unsigned char *md, MDC2_CTX *c);
89void MDC2_Update(); 87unsigned char *MDC2(const unsigned char *d, unsigned long n,
90void MDC2_Final(); 88 unsigned char *md);
91unsigned char *MDC2();
92
93#endif
94 89
95#ifdef __cplusplus 90#ifdef __cplusplus
96} 91}