📄 crypt.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>crypt</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_002_047"> </a>NAME</h4><blockquote>crypt - string encoding function(<b>CRYPT</b>)</blockquote><h4><a name = "tag_000_002_048"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="unistd.h.html">unistd.h</a>>char *crypt (const char *<i>key</i>, const char *<i>salt</i>);</code></pre></blockquote><h4><a name = "tag_000_002_049"> </a>DESCRIPTION</h4><blockquote>The<i>crypt()</i>function is a string encoding function. The algorithm isimplementation-dependent.<p>The<i>key</i>argument points toa string to be encoded.The<i>salt</i>argument is a string chosen from theset:<pre><code>a b c d e f g h i j k l m n o p q r s t u v w x y zA B C D E F G H I J K L M N O P Q R S T U V W X Y Z0 1 2 3 4 5 6 7 8 9 . /</code></pre>The first two characters of thisstring may be used to perturb the encoding algorithm.<p>The return value of<i>crypt()</i>points to static data that is overwritten by each call.<p>This need not be a reentrant function.</blockquote><h4><a name = "tag_000_002_050"> </a>RETURN VALUE</h4><blockquote>Upon successful completion,<i>crypt()</i>returns a pointer to the encoded string.The first two characters of the returned value are those of the<i>salt</i>argument.<p>Otherwise it returns a null pointer and sets<i>errno</i>to indicate the error.</blockquote><h4><a name = "tag_000_002_051"> </a>ERRORS</h4><blockquote>The<i>crypt()</i>function will fail if:<dl compact><dt>[ENOSYS]<dd>The functionality is not supported on this implementation.</dl></blockquote><h4><a name = "tag_000_002_052"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_002_053"> </a>APPLICATION USAGE</h4><blockquote>The values returned by thisfunction need not be portable among XSI-conformant systems.</blockquote><h4><a name = "tag_000_002_054"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_002_055"> </a>SEE ALSO</h4><blockquote><i><a href="encrypt.html">encrypt()</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 + -