8939 btxld coverity cleanups
[unleashed.git] / include / crypt.h
blob45a6fc8487e5a95118869f5411a988ea140deccb
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 /* Copyright (c) 1988 AT&T */
29 /* All Rights Reserved */
32 #ifndef _CRYPT_H
33 #define _CRYPT_H
35 #include <pwd.h>
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
41 /* Password and file encryption functions */
43 #define CRYPT_MAXCIPHERTEXTLEN 512
45 extern char *crypt(const char *, const char *);
46 extern char *crypt_gensalt(const char *, const struct passwd *);
47 extern char *crypt_genhash_impl(char *, size_t, const char *,
48 const char *, const char **);
49 extern char *crypt_gensalt_impl(char *, size_t, const char *,
50 const struct passwd *, const char **);
51 extern int crypt_close(int *);
52 extern char *des_crypt(const char *, const char *);
53 extern void des_encrypt(char *, int);
54 extern void des_setkey(const char *);
55 extern void encrypt(char *, int);
56 extern int run_crypt(long, char *, unsigned, int *);
57 extern int run_setkey(int *, const char *);
58 extern void setkey(const char *);
60 #ifdef __cplusplus
62 #endif
64 #endif /* _CRYPT_H */