svn: /phpdoc/ja/trunk/reference/password/functions/ password-hash.xml password-needs-rehash.xml
[email protected] (Yoshinari Takaoka)
| Newsgroups | php.doc.ja |
|---|---|
| Message-ID | <[email protected]> |
mumumu Sun, 24 May 2020 12:32:26 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=349973
Log:
Fix section order
It's supposed to be return values, changelog, examples.
Changed paths:
U phpdoc/ja/trunk/reference/password/functions/password-hash.xml
U phpdoc/ja/trunk/reference/password/functions/password-needs-rehash.xml
Modified: phpdoc/ja/trunk/reference/password/functions/password-hash.xml
===================================================================
--- phpdoc/ja/trunk/reference/password/functions/password-hash.xml 2020-05-24 11:49:30 UTC (rev 349972)
+++ phpdoc/ja/trunk/reference/password/functions/password-hash.xml 2020-05-24 12:32:26 UTC (rev 349973)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 349903 Maintainer: takagi Status: ready -->
+<!-- EN-Revision: 349972 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.password-hash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -183,6 +183,45 @@
</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>
+ <parameter>algo</parameter> パラメータは &string; を期待するようになりました。
+ しかし、後方互換性のために &integer; も未だ受け入れています。
+ </entry>
+ </row>
+ <row>
+ <entry>7.3.0</entry>
+ <entry>
+ <constant>PASSWORD_ARGON2ID</constant> を使った、
+ Argon2id パスワードのサポートが追加されました。
+ </entry>
+ </row>
+ <row>
+ <entry>7.2.0</entry>
+ <entry>
+ <constant>PASSWORD_ARGON2I</constant> を使った、
+ Argon2i パスワードのサポートが追加されました。
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -339,45 +378,6 @@
</note>
</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>
- <parameter>algo</parameter> パラメータは &string; を期待するようになりました。
- しかし、後方互換性のために &integer; も未だ受け入れています。
- </entry>
- </row>
- <row>
- <entry>7.3.0</entry>
- <entry>
- <constant>PASSWORD_ARGON2ID</constant> を使った、
- Argon2id パスワードのサポートが追加されました。
- </entry>
- </row>
- <row>
- <entry>7.2.0</entry>
- <entry>
- <constant>PASSWORD_ARGON2I</constant> を使った、
- Argon2i パスワードのサポートが追加されました。
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
- </refsect1>
-
<refsect1 role="seealso">
&reftitle.seealso;
<para>
Modified: phpdoc/ja/trunk/reference/password/functions/password-needs-rehash.xml
===================================================================
--- phpdoc/ja/trunk/reference/password/functions/password-needs-rehash.xml 2020-05-24 11:49:30 UTC (rev 349972)
+++ phpdoc/ja/trunk/reference/password/functions/password-needs-rehash.xml 2020-05-24 12:32:26 UTC (rev 349973)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 349903 Maintainer: takagi Status: ready -->
+<!-- EN-Revision: 349972 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.password-needs-rehash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -53,39 +53,6 @@
</variablelist>
</refsect1>
- <refsect1 role="examples">
- &reftitle.examples;
- <para>
- <example>
- <title><function>password_needs_rehash</function> の使用例</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-
-$password = 'rasmuslerdorf';
-$hash = '$2y$10$YCFsG6elYca568hBi2pZ0.3LDL5wjgxct1N8w/oLR/jfHsiQwCqTS';
-
-// cost パラメータは、ハードウェアの性能の向上にあわせて変えることができます
-$options = array('cost' => 11);
-
-// 格納されたハッシュを、平文のパスワードに対して検証します
-if (password_verify($password, $hash)) {
- // より新しいハッシュアルゴリズムの存在や、コストの変更を
- // 確認します
- if (password_needs_rehash($hash, PASSWORD_DEFAULT, $options)) {
- // そんな場合は新しいハッシュを計算して、古いものを置き換えます
- $newHash = password_hash($password, PASSWORD_DEFAULT, $options);
- }
-
- // ログイン
-}
-?>
-]]>
- </programlisting>
- </example>
- </para>
- </refsect1>
-
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
@@ -120,6 +87,39 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>password_needs_rehash</function> の使用例</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$password = 'rasmuslerdorf';
+$hash = '$2y$10$YCFsG6elYca568hBi2pZ0.3LDL5wjgxct1N8w/oLR/jfHsiQwCqTS';
+
+// cost パラメータは、ハードウェアの性能の向上にあわせて変えることができます
+$options = array('cost' => 11);
+
+// 格納されたハッシュを、平文のパスワードに対して検証します
+if (password_verify($password, $hash)) {
+ // より新しいハッシュアルゴリズムの存在や、コストの変更を
+ // 確認します
+ if (password_needs_rehash($hash, PASSWORD_DEFAULT, $options)) {
+ // そんな場合は新しいハッシュを計算して、古いものを置き換えます
+ $newHash = password_hash($password, PASSWORD_DEFAULT, $options);
+ }
+
+ // ログイン
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file