1SETKEY(3P)                 POSIX Programmer's Manual                SETKEY(3P)
2
3
4

PROLOG

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
11

NAME

13       setkey — set encoding key (CRYPT)
14

SYNOPSIS

16       #include <stdlib.h>
17
18       void setkey(const char *key);
19

DESCRIPTION

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 thread-safe.
35

RETURN VALUE

37       No values are returned.
38

ERRORS

40       The setkey() function shall fail if:
41
42       ENOSYS The functionality is not supported on this implementation.
43
44       The following sections are informative.
45

EXAMPLES

47       None.
48

APPLICATION USAGE

50       Decoding  need  not be implemented in all environments. This is related
51       to government restrictions in some countries on encryption and  decryp‐
52       tion routines. Historical practice has been to ship a different version
53       of the encryption library without the decryption feature  in  the  rou‐
54       tines  supplied.  Thus  the exported version of encrypt() does encoding
55       but not decoding.
56

RATIONALE

58       None.
59

FUTURE DIRECTIONS

61       None.
62

SEE ALSO

64       crypt(), encrypt()
65
66       The Base Definitions volume of POSIX.1‐2008, <stdlib.h>
67
69       Portions of this text are reprinted and reproduced in  electronic  form
70       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
71       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
72       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
73       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
74       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) 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.unix.org/online.html .
79
80       Any  typographical  or  formatting  errors that appear in this page are
81       most likely to have been introduced during the conversion of the source
82       files  to  man page format. To report such errors, see https://www.ker
83       nel.org/doc/man-pages/reporting_bugs.html .
84
85
86
87IEEE/The Open Group                  2013                           SETKEY(3P)
Impressum