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

encrypt.3p (3366B)


  1. '\" et
  2. .TH ENCRYPT "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. encrypt
  12. \(em encoding function
  13. (\fBCRYPT\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <unistd.h>
  18. .P
  19. void encrypt(char \fIblock\fP[64], int \fIedflag\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIencrypt\fR()
  24. function shall provide access to an implementation-defined encoding
  25. algorithm. The key generated by
  26. \fIsetkey\fR()
  27. is used to encrypt the string
  28. .IR block
  29. with
  30. \fIencrypt\fR().
  31. .P
  32. The
  33. .IR block
  34. argument to
  35. \fIencrypt\fR()
  36. shall be an array of length 64 bytes containing only the bytes with
  37. values of 0 and 1. The array is modified in place to a similar
  38. array using the key set by
  39. \fIsetkey\fR().
  40. If
  41. .IR edflag
  42. is 0, the argument is encoded. If
  43. .IR edflag
  44. is 1, the argument may be decoded (see the APPLICATION USAGE section);
  45. if the argument is not decoded,
  46. .IR errno
  47. shall be set to
  48. .BR [ENOSYS] .
  49. .P
  50. The
  51. \fIencrypt\fR()
  52. function shall not change the setting of
  53. .IR errno
  54. if successful. An application wishing to check for error situations
  55. should set
  56. .IR errno
  57. to 0 before calling
  58. \fIencrypt\fR().
  59. If
  60. .IR errno
  61. is non-zero on return, an error has occurred.
  62. .P
  63. The
  64. \fIencrypt\fR()
  65. function need not be thread-safe.
  66. .SH "RETURN VALUE"
  67. The
  68. \fIencrypt\fR()
  69. function shall not return a value.
  70. .SH ERRORS
  71. The
  72. \fIencrypt\fR()
  73. function shall fail if:
  74. .TP
  75. .BR ENOSYS
  76. The functionality is not supported on this implementation.
  77. .LP
  78. .IR "The following sections are informative."
  79. .SH EXAMPLES
  80. None.
  81. .SH "APPLICATION USAGE"
  82. Historical implementations of the
  83. \fIencrypt\fR()
  84. function used a rather primitive encoding algorithm.
  85. .P
  86. In some environments, decoding might not be implemented. This is
  87. related to some Government restrictions on encryption and decryption
  88. routines. Historical practice has been to ship a different version of
  89. the encryption library without the decryption feature in the routines
  90. supplied. Thus the exported version of
  91. \fIencrypt\fR()
  92. does encoding but not decoding.
  93. .SH RATIONALE
  94. None.
  95. .SH "FUTURE DIRECTIONS"
  96. A future version of the standard may mark this interface as
  97. obsolete or remove it altogether.
  98. .SH "SEE ALSO"
  99. .IR "\fIcrypt\fR\^(\|)",
  100. .IR "\fIsetkey\fR\^(\|)"
  101. .P
  102. The Base Definitions volume of POSIX.1\(hy2017,
  103. .IR "\fB<unistd.h>\fP"
  104. .\"
  105. .SH COPYRIGHT
  106. Portions of this text are reprinted and reproduced in electronic form
  107. from IEEE Std 1003.1-2017, Standard for Information Technology
  108. -- Portable Operating System Interface (POSIX), The Open Group Base
  109. Specifications Issue 7, 2018 Edition,
  110. Copyright (C) 2018 by the Institute of
  111. Electrical and Electronics Engineers, Inc and The Open Group.
  112. In the event of any discrepancy between this version and the original IEEE and
  113. The Open Group Standard, the original IEEE and The Open Group Standard
  114. is the referee document. The original Standard can be obtained online at
  115. http://www.opengroup.org/unix/online.html .
  116. .PP
  117. Any typographical or formatting errors that appear
  118. in this page are most likely
  119. to have been introduced during the conversion of the source files to
  120. man page format. To report such errors, see
  121. https://www.kernel.org/doc/man-pages/reporting_bugs.html .