1SETKEY(3P) POSIX Programmer's Manual SETKEY(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 setkey - set encoding key (CRYPT)
13
15 #include <stdlib.h>
16
17 void setkey(const char *key);
18
19
21 The setkey() function provides access to an implementation-defined
22 encoding algorithm. The argument of setkey() is an array of length 64
23 bytes containing only the bytes with numerical value of 0 and 1. If
24 this string is divided into groups of 8, the low-order bit in each
25 group is ignored; this gives a 56-bit key which is used by the algo‐
26 rithm. This is the key that shall be used with the algorithm to encode
27 a string block passed to encrypt().
28
29 The setkey() function shall not change the setting of errno if success‐
30 ful. An application wishing to check for error situations should set
31 errno to 0 before calling setkey(). If errno is non-zero on return, an
32 error has occurred.
33
34 The setkey() function need not be reentrant. A function that is not
35 required to be reentrant is not required to be thread-safe.
36
38 No values are returned.
39
41 The setkey() function shall fail if:
42
43 ENOSYS The functionality is not supported on this implementation.
44
45
46 The following sections are informative.
47
49 None.
50
52 Decoding need not be implemented in all environments. This is related
53 to government restrictions in some countries on encryption and decryp‐
54 tion routines. Historical practice has been to ship a different version
55 of the encryption library without the decryption feature in the rou‐
56 tines supplied. Thus the exported version of encrypt() does encoding
57 but not decoding.
58
60 None.
61
63 None.
64
66 crypt(), encrypt(), the Base Definitions volume of
67 IEEE Std 1003.1-2001, <stdlib.h>
68
70 Portions of this text are reprinted and reproduced in electronic form
71 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
72 -- Portable Operating System Interface (POSIX), The Open Group Base
73 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
74 Electrical and Electronics Engineers, Inc and The Open Group. In the
75 event of any discrepancy between this version and the original IEEE and
76 The Open Group Standard, the original IEEE and The Open Group Standard
77 is the referee document. The original Standard can be obtained online
78 at http://www.opengroup.org/unix/online.html .
79
80
81
82IEEE/The Open Group 2003 SETKEY(3P)