Annotation of OpenXM/src/ox_ntl/crypt/des/des3.h, Revision 1.2
1.2 ! iwane 1: /* $OpenXM: OpenXM/src/ox_ntl/crypt/des/des3.h,v 1.1 2005/06/19 15:30:01 iwane Exp $ */
1.1 iwane 2: /*
3: * Triple-DES
4: */
5:
6:
7: #ifndef __DES3_H__
8: #define __DES3_H__
9:
10: #include "des.h"
11:
12:
13: typedef struct {
14: des_key key[3];
15: } des3_key;
16:
17:
18: #ifdef __cplusplus
19: extern "C" {
20: #endif
21:
22: int des3_keychk(des3_key *);
23: void des3_keyset(const unsigned char *key, des3_key *);
24:
25: int des3_enc_c(const des3_key *, const unsigned char *, unsigned char *);
26: int des3_dec_c(const des3_key *, const unsigned char *, unsigned char *);
27:
28:
29: int des3_enc_ecb(const des3_key *, int len, const unsigned char *, unsigned char *);
30: int des3_dec_ecb(const des3_key *, int len, const unsigned char *, unsigned char *);
31:
1.2 ! iwane 32: int des3_enc_cbc(const des3_key *, unsigned char *, int len, const unsigned char *, unsigned char *);
1.1 iwane 33: int des3_dec_cbc(const des3_key *, unsigned char *, int len, const unsigned char *, unsigned char *);
34:
35: int des3_enc_cfb(const des3_key *, int bit, const unsigned char *iv, int len, const unsigned char *, unsigned char *);
36: int des3_dec_cfb(const des3_key *, int bit, const unsigned char *iv, int len, const unsigned char *, unsigned char *);
37:
38: int des3_ofb(const des3_key *, int bit, const unsigned char *iv, int len, const unsigned char *, unsigned char *);
39:
40: #ifdef __cplusplus
41: }
42: #endif
43:
44: #endif /* __DES_H__ */
45:
46: /* EOF */
47:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>