xref: /onnv-gate/usr/src/head/crypt.h (revision 6532:09f1081b8fb2)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*6532Swyllys  * Common Development and Distribution License (the "License").
6*6532Swyllys  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*6532Swyllys  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
270Sstevel@tonic-gate /*	  All Rights Reserved  	*/
280Sstevel@tonic-gate 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #ifndef	_CRYPT_H
310Sstevel@tonic-gate #define	_CRYPT_H
320Sstevel@tonic-gate 
330Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.1	*/
340Sstevel@tonic-gate 
350Sstevel@tonic-gate #include <pwd.h>
360Sstevel@tonic-gate 
370Sstevel@tonic-gate #ifdef	__cplusplus
380Sstevel@tonic-gate extern "C" {
390Sstevel@tonic-gate #endif
400Sstevel@tonic-gate 
410Sstevel@tonic-gate /* Password and file encryption functions */
420Sstevel@tonic-gate 
43*6532Swyllys #define	CRYPT_MAXCIPHERTEXTLEN	512
440Sstevel@tonic-gate 
450Sstevel@tonic-gate #if defined(__STDC__)
460Sstevel@tonic-gate extern char *crypt(const char *, const char *);
470Sstevel@tonic-gate extern char *crypt_gensalt(const char *, const struct passwd *);
480Sstevel@tonic-gate extern char *crypt_genhash_impl(char *, size_t, const char *,
490Sstevel@tonic-gate     const char *, const char **);
500Sstevel@tonic-gate extern char *crypt_gensalt_impl(char *, size_t, const char *,
510Sstevel@tonic-gate     const struct passwd *, const char **);
520Sstevel@tonic-gate extern int crypt_close(int *);
530Sstevel@tonic-gate extern char *des_crypt(const char *, const char *);
540Sstevel@tonic-gate extern void des_encrypt(char *, int);
550Sstevel@tonic-gate extern void des_setkey(const char *);
560Sstevel@tonic-gate extern void encrypt(char *, int);
570Sstevel@tonic-gate extern int run_crypt(long, char *, unsigned, int *);
580Sstevel@tonic-gate extern int run_setkey(int *, const char *);
590Sstevel@tonic-gate extern void setkey(const char *);
600Sstevel@tonic-gate #else
610Sstevel@tonic-gate extern char *crypt();
620Sstevel@tonic-gate extern char *crypt_gensalt();
630Sstevel@tonic-gate extern char *crypt_genhash_impl();
640Sstevel@tonic-gate extern char *crytp_gensalt_impl();
650Sstevel@tonic-gate extern int crypt_close();
660Sstevel@tonic-gate extern char *des_crypt();
670Sstevel@tonic-gate extern void des_encrypt();
680Sstevel@tonic-gate extern void des_setkey();
690Sstevel@tonic-gate extern void encrypt();
700Sstevel@tonic-gate extern int run_crypt();
710Sstevel@tonic-gate extern int run_setkey();
720Sstevel@tonic-gate extern void setkey();
730Sstevel@tonic-gate #endif
740Sstevel@tonic-gate 
750Sstevel@tonic-gate #ifdef	__cplusplus
760Sstevel@tonic-gate }
770Sstevel@tonic-gate #endif
780Sstevel@tonic-gate 
790Sstevel@tonic-gate #endif	/* _CRYPT_H */
80