1 /* 2 * CDDL HEADER START 3 * 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 7 * with the License. 8 * 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. 13 * 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] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 /* Copyright (c) 1988 AT&T */ 28 /* All Rights Reserved */ 29 30 31 #ifndef _CRYPT_H 32 #define _CRYPT_H 33 34 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ 35 36 #include <pwd.h> 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /* Password and file encryption functions */ 43 44 #define CRYPT_MAXCIPHERTEXTLEN 100 45 46 #if defined(__STDC__) 47 extern char *crypt(const char *, const char *); 48 extern char *crypt_gensalt(const char *, const struct passwd *); 49 extern char *crypt_genhash_impl(char *, size_t, const char *, 50 const char *, const char **); 51 extern char *crypt_gensalt_impl(char *, size_t, const char *, 52 const struct passwd *, const char **); 53 extern int crypt_close(int *); 54 extern char *des_crypt(const char *, const char *); 55 extern void des_encrypt(char *, int); 56 extern void des_setkey(const char *); 57 extern void encrypt(char *, int); 58 extern int run_crypt(long, char *, unsigned, int *); 59 extern int run_setkey(int *, const char *); 60 extern void setkey(const char *); 61 #else 62 extern char *crypt(); 63 extern char *crypt_gensalt(); 64 extern char *crypt_genhash_impl(); 65 extern char *crytp_gensalt_impl(); 66 extern int crypt_close(); 67 extern char *des_crypt(); 68 extern void des_encrypt(); 69 extern void des_setkey(); 70 extern void encrypt(); 71 extern int run_crypt(); 72 extern int run_setkey(); 73 extern void setkey(); 74 #endif 75 76 #ifdef __cplusplus 77 } 78 #endif 79 80 #endif /* _CRYPT_H */ 81