4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
26 * Copyright (c) 1997, 2000 by Sun Microsystems, Inc.
27 * All rights reserved.
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/types.h>
33 #include <des/softdes.h>
34 #include <des/desdata.h>
38 * usr/src/lib/libcrypt
42 void setkey(const char *key);
43 void encrypt(char *block, int edflag);
44 char *crypt(const char *pw, const char *salt);
47 int _run_setkey(int p[2], const char *keyparam);
48 int run_setkey(int p[2], const char *keyparam);
49 int _run_crypt(long offset, char *buffer, unsigned int count, int p[2]);
50 int run_crypt(long offset, char *buffer, unsigned int count, int p[2]);
51 int _makekey(int b[2]);
52 int makekey(int b[2]);
53 int crypt_close_nolock(int p[2]);
54 int _crypt_close(int p[2]);
55 int crypt_close(int p[2]);
58 int cbc_crypt(char *key, char *buf, size_t len, unsigned int mode, char *ivec);
59 int ecb_crypt(char *key, char *buf, size_t len, unsigned int mode);
62 void _des_setkey(const char *key);
63 void des_setkey(const char *key);
64 void _des_encrypt(char *block, int edflag);
65 void des_encrypt(char *block, int edflag);
66 char *des_crypt(const char *pw, const char *salt);
69 void _des_decrypt1(char *block, char *L, char *IP, char *R, char *preS,
70 char *E, char KS[][48], char S[][64], char *f,
71 char *tempL, char *P, char *FP);
74 void des_encrypt1(char *block, char *L, char *IP, char *R, char *preS,
75 char *E, char KS[][48], char S[][64], char *f,
76 char *tempL, char *P, char *FP);
77 void _des_encrypt1(char *block, char *L, char *IP, char *R, char *preS,
78 char *E, char KS[][48], char S[][64], char *f,
79 char *tempL, char *P, char *FP);
82 void des_setparity(char *p);
83 int __des_crypt(char *buf, unsigned len, struct desparams *desp);