logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

setkey.3p (3064B)


  1. '\" et
  2. .TH SETKEY "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. setkey
  12. \(em set encoding key
  13. (\fBCRYPT\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <stdlib.h>
  18. .P
  19. void setkey(const char *\fIkey\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIsetkey\fR()
  24. function provides access to an implementation-defined encoding
  25. algorithm. The argument of
  26. \fIsetkey\fR()
  27. is an array of length 64 bytes containing only the bytes with numerical
  28. value of 0 and 1. If this string is divided into groups of 8, the
  29. low-order bit in each group is ignored; this gives a 56-bit key which
  30. is used by the algorithm. This is the key that shall be used with the
  31. algorithm to encode a string
  32. .IR block
  33. passed to
  34. \fIencrypt\fR().
  35. .P
  36. The
  37. \fIsetkey\fR()
  38. function shall not change the setting of
  39. .IR errno
  40. if successful. An application wishing to check for error situations
  41. should set
  42. .IR errno
  43. to 0 before calling
  44. \fIsetkey\fR().
  45. If
  46. .IR errno
  47. is non-zero on return, an error has occurred.
  48. .P
  49. The
  50. \fIsetkey\fR()
  51. function need not be thread-safe.
  52. .SH "RETURN VALUE"
  53. No values are returned.
  54. .SH ERRORS
  55. The
  56. \fIsetkey\fR()
  57. function shall fail if:
  58. .TP
  59. .BR ENOSYS
  60. The functionality is not supported on this implementation.
  61. .LP
  62. .IR "The following sections are informative."
  63. .SH EXAMPLES
  64. None.
  65. .SH "APPLICATION USAGE"
  66. Decoding need not be implemented in all environments. This is related
  67. to government restrictions in some countries on encryption and
  68. decryption routines. Historical practice has been to ship a different
  69. version of the encryption library without the decryption feature in the
  70. routines supplied. Thus the exported version of
  71. \fIencrypt\fR()
  72. does encoding but not decoding.
  73. .SH RATIONALE
  74. None.
  75. .SH "FUTURE DIRECTIONS"
  76. A future version of the standard may mark this interface as obsolete
  77. or remove it altogether.
  78. .SH "SEE ALSO"
  79. .IR "\fIcrypt\fR\^(\|)",
  80. .IR "\fIencrypt\fR\^(\|)"
  81. .P
  82. The Base Definitions volume of POSIX.1\(hy2017,
  83. .IR "\fB<stdlib.h>\fP"
  84. .\"
  85. .SH COPYRIGHT
  86. Portions of this text are reprinted and reproduced in electronic form
  87. from IEEE Std 1003.1-2017, Standard for Information Technology
  88. -- Portable Operating System Interface (POSIX), The Open Group Base
  89. Specifications Issue 7, 2018 Edition,
  90. Copyright (C) 2018 by the Institute of
  91. Electrical and Electronics Engineers, Inc and The Open Group.
  92. In the event of any discrepancy between this version and the original IEEE and
  93. The Open Group Standard, the original IEEE and The Open Group Standard
  94. is the referee document. The original Standard can be obtained online at
  95. http://www.opengroup.org/unix/online.html .
  96. .PP
  97. Any typographical or formatting errors that appear
  98. in this page are most likely
  99. to have been introduced during the conversion of the source files to
  100. man page format. To report such errors, see
  101. https://www.kernel.org/doc/man-pages/reporting_bugs.html .