source: trunk/gsdl/packages/wincrypt/crypt.h@ 1641

Last change on this file since 1641 was 1002, checked in by sjboddie, 24 years ago

added wincrypt to cvs

  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/*
2 * UFC-crypt: ultra fast crypt(3) implementation
3 *
4 * Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with the GNU C Library; see the file COPYING.LIB. If not,
18 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 *
21 * @(#)crypt.h 1.5 12/20/96
22 *
23 */
24
25#ifndef _CRYPT_H
26#define _CRYPT_H 1
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32
33#include "features.h"
34
35#ifndef __BEGIN_DECLS
36#define __BEGIN_DECLS
37#endif
38#ifndef __P
39#define __P(x) x
40#endif
41#ifndef __END_DECLS
42#define __END_DECLS
43#endif
44
45__BEGIN_DECLS
46
47/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
48extern char *crypt __P ((__const char *__key, __const char *__salt));
49
50/* Setup DES tables according KEY. */
51extern void setkey __P ((__const char *__key));
52
53/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
54 block in place. */
55extern void encrypt __P ((char *__block, int __edflag));
56
57struct crypt_data
58 {
59 char keysched[16 * 8];
60 char sb0[32768];
61 char sb1[32768];
62 char sb2[32768];
63 char sb3[32768];
64 /* end-of-aligment-critical-data */
65 char crypt_3_buf[14];
66 char current_salt[2];
67 long int current_saltbits;
68 int direction, initialized;
69 };
70
71#ifdef __USE_GNU
72/* Reentrant versions of the functions above. The additional argument
73 points to a structure where the results are placed in. */
74
75extern char *__crypt_r __P ((__const char *__key, __const char *__salt,
76 struct crypt_data *__data));
77extern char *crypt_r __P ((__const char *__key, __const char *__salt,
78 struct crypt_data *__data));
79
80extern void __setkey_r __P ((__const char *__key, struct crypt_data *__data));
81extern void setkey_r __P ((__const char *__key, struct crypt_data *__data));
82
83extern void __encrypt_r __P ((char *__block, int __edflag,
84 struct crypt_data *__data));
85extern void encrypt_r __P ((char *__block, int __edflag,
86 struct crypt_data *__data));
87#endif
88
89__END_DECLS
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* crypt.h */
Note: See TracBrowser for help on using the repository browser.