mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Fix #79565: Documentation missing for password_algos()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349903 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
78aa9e47fa
commit
c9596f7576
5 changed files with 146 additions and 6 deletions
|
@ -10,7 +10,7 @@
|
|||
<varlistentry xml:id="constant.password-bcrypt">
|
||||
<term>
|
||||
<constant>PASSWORD_BCRYPT</constant>
|
||||
(<type>integer</type>)
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<varlistentry xml:id="constant.password-argon2i">
|
||||
<term>
|
||||
<constant>PASSWORD_ARGON2I</constant>
|
||||
(<type>integer</type>)
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -91,7 +91,7 @@
|
|||
<varlistentry xml:id="constant.password-argon2id">
|
||||
<term>
|
||||
<constant>PASSWORD_ARGON2ID</constant>
|
||||
(<type>integer</type>)
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<varlistentry xml:id="constant.password-default">
|
||||
<term>
|
||||
<constant>PASSWORD_DEFAULT</constant>
|
||||
(<type>integer</type>)
|
||||
(<type>mixed</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -179,6 +179,33 @@
|
|||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<formalpara>
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.4.0</entry>
|
||||
<entry>
|
||||
The values of the password algo IDs (<constant>PASSWORD_BCRYPT</constant>, <constant>PASSWORD_ARGON2I</constant>,
|
||||
<constant>PASSWORD_ARGON2ID</constant> and <constant>PASSWORD_DEFAULT</constant>) are now &string;s.
|
||||
Previously, they have been &integer;s.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
79
reference/password/functions/password-algos.xml
Normal file
79
reference/password/functions/password-algos.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.password-algos" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>password_algos</refname>
|
||||
<refpurpose>Get available password hashing algorithm IDs</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>password_algos</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a complete list of all registered password hashing algorithm IDs as an &array; of &string;s.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the available password hashing algorithm IDs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example xml:id="password-algos.example.basic">
|
||||
<title>Basic <function>password</function> usage</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(password_algos());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[0] => 2y
|
||||
[1] => argon2i
|
||||
[2] => argon2id
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -12,7 +12,7 @@
|
|||
<methodsynopsis>
|
||||
<type>string</type><methodname>password_hash</methodname>
|
||||
<methodparam><type>string</type><parameter>password</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>algo</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>algo</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -341,6 +341,13 @@ Argon2i hash: $argon2i$v=19$m=1024,t=2,p=2$YzJBSzV4TUhkMzc3d3laeg$zqU/1IN0/AogfP
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.4.0</entry>
|
||||
<entry>
|
||||
The <parameter>algo</parameter> parameter expects a &string; now, but still accepts
|
||||
&integer;s for backward compatibility.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>password_needs_rehash</methodname>
|
||||
<methodparam><type>string</type><parameter>hash</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>algo</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>algo</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -93,6 +93,32 @@ if (password_verify($password, $hash)) {
|
|||
otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.4.0</entry>
|
||||
<entry>
|
||||
The <parameter>algo</parameter> parameter expects a &string; now, but still accepts
|
||||
&integer;s for backward compatibility.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Do NOT translate this file
|
||||
-->
|
||||
<versions>
|
||||
<function name="password_algos" from="PHP 7 >= 7.4.0"/>
|
||||
<function name="password_get_info" from="PHP 5 >= 5.5.0, PHP 7"/>
|
||||
<function name="password_hash" from="PHP 5 >= 5.5.0, PHP 7"/>
|
||||
<function name="password_needs_rehash" from="PHP 5 >= 5.5.0, PHP 7"/>
|
||||
|
|
Loading…
Reference in a new issue