📄 encrypt.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>encrypt</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_003_196"> </a>NAME</h4><blockquote>encrypt - encoding function(<b>CRYPT</b>)</blockquote><h4><a name = "tag_000_003_197"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="unistd.h.html">unistd.h</a>>void encrypt(char <i>block</i>[64], int <i>edflag</i>);</code></pre></blockquote><h4><a name = "tag_000_003_198"> </a>DESCRIPTION</h4><blockquote>The<i>encrypt()</i>function provides (rather primitive)access to an implementation-dependent encoding algorithm.The key generated by<i><a href="setkey.html">setkey()</a></i>is used to encrypt the string<i>block</i>with<i>encrypt()</i>.<p>The<i>block</i>argument to<i>encrypt()</i>is an array of length 64 bytes containing only the byteswith numerical value of 0 and 1.The array is modified in place to a similar arrayusing the key set by<i><a href="setkey.html">setkey()</a></i>.If<i>edflag</i>is 0, the argument is encoded. If<i>edflag</i>is 1, the argument may be decoded (see the APPLICATION USAGEsection below); if the argument is not decoded,<i>errno</i>will be set to [ENOSYS].<p>The<i>encrypt()</i>function will not change the setting of<i>errno</i>if successful.<p>This interface need not be reentrant.</blockquote><h4><a name = "tag_000_003_199"> </a>RETURN VALUE</h4><blockquote>The<i>encrypt()</i>function returns no value.</blockquote><h4><a name = "tag_000_003_200"> </a>ERRORS</h4><blockquote>The<i>encrypt()</i>functionwill fail if:<dl compact><dt>[ENOSYS]<dd>The functionality is not supported on this implementation.</dl></blockquote><h4><a name = "tag_000_003_201"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_003_202"> </a>APPLICATION USAGE</h4><blockquote>In some environments, decoding might not be implemented. This is related toU.S. Government restrictions on encryption and decryption routines:the DES decryption algorithm cannot be exported outside the U.S.A.Historical practice has been to ship a different version of the encryptionlibrary without the decryption feature in the routines supplied.Thus the exported version of<i>encrypt()</i>does encoding but not decoding.</blockquote><h4><a name = "tag_000_003_203"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_003_204"> </a>SEE ALSO</h4><blockquote><i><a href="crypt.html">crypt()</a></i>,<i><a href="setkey.html">setkey()</a></i>,<i><a href="unistd.h.html"><unistd.h></a></i>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from Issue 1 of the SVID.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -