man-pages/man3/crypt_preferred_method.3.html
2021-03-31 01:06:50 +01:00

133 lines
2.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of CRYPT_PREFERRED_METHOD</TITLE>
</HEAD><BODY>
<H1>CRYPT_PREFERRED_METHOD</H1>
Section: C Library Functions (3)<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<BR>BSD mandoc<BR>
libxcrypt
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>crypt_preferred_method</B>
- get the prefix of the preferred hash method
<A NAME="lbAC">&nbsp;</A>
<H2>LIBRARY</H2>
Lb libcrypt
<A NAME="lbAD">&nbsp;</A>
<H2>SYNOPSIS</H2>
In crypt.h
Ft const char*
Fo crypt_preferred_method
Fa void
Fc <A NAME="lbAE">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B></B>
is a convenience function to get the prefix of the preferred hash
method. If a preferred method is available, it is the same as the
one also used by the
<B>crypt_gensalt functions</B>
if their given
<I>prefix</I>
parameter is NULL.
<A NAME="lbAF">&nbsp;</A>
<H2>RETURN VALUES</H2>
The string returned equals the prefix of the preferred hash method.
If no preferred hash method is available it is NULL. It
<I>is</I>
safe to pass the string returned by
<B>crypt_preferred_method</B>
directly to
<B>crypt_gensalt</B>
without prior string-sanitizing nor NULL-pointer checks.
<A NAME="lbAG">&nbsp;</A>
<H2>FEATURE TEST MACROS</H2>
In crypt.h
will define the macro
<B>CRYPT_PREFERRED_METHOD_AVAILABLE</B>
if
<B></B>
is available in the current version of libxcrypt.
<A NAME="lbAH">&nbsp;</A>
<H2>PORTABILITY NOTES</H2>
The function
<B></B>
is not part of any standard.
It was added to libxcrypt in version 4.4.0.
<A NAME="lbAI">&nbsp;</A>
<H2>ATTRIBUTES</H2>
For an explanation of the terms used in this section, see
<A HREF="/cgi-bin/man/man2html?7+attributes">attributes</A>(7).
<TABLE BORDER>
<TR VALIGN=top><TD><B>Interface</B></TD><TD><B>Attribute</B></TD><TD><B>Value</B><BR></TD></TR>
<TR VALIGN=top><TD>
<B></B>
</TD><TD>Thread safety</TD><TD>MT-Safe<BR></TD></TR>
</TABLE>
<P>
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
crypt_gensalt3
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">LIBRARY</A><DD>
<DT id="3"><A HREF="#lbAD">SYNOPSIS</A><DD>
<DT id="4"><A HREF="#lbAE">DESCRIPTION</A><DD>
<DT id="5"><A HREF="#lbAF">RETURN VALUES</A><DD>
<DT id="6"><A HREF="#lbAG">FEATURE TEST MACROS</A><DD>
<DT id="7"><A HREF="#lbAH">PORTABILITY NOTES</A><DD>
<DT id="8"><A HREF="#lbAI">ATTRIBUTES</A><DD>
<DT id="9"><A HREF="#lbAJ">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:38 GMT, March 31, 2021
</BODY>
</HTML>