svn: /phpdoc/ru/trunk/reference/password/functions/ password-hash.xml password-needs-rehash.xml

[email protected] (Sergey Panteleev)
Newsgroups php.doc.ru
Message-ID <[email protected]>
sergey                                   Mon, 25 May 2020 04:07:10 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=349975

Log:
docs(ru): Updated to English revision

Changed paths:
    U   phpdoc/ru/trunk/reference/password/functions/password-hash.xml
    U   phpdoc/ru/trunk/reference/password/functions/password-needs-rehash.xml

Modified: phpdoc/ru/trunk/reference/password/functions/password-hash.xml
===================================================================
--- phpdoc/ru/trunk/reference/password/functions/password-hash.xml	2020-05-24 16:55:35 UTC (rev 349974)
+++ phpdoc/ru/trunk/reference/password/functions/password-hash.xml	2020-05-25 04:07:10 UTC (rev 349975)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 349903 Maintainer: rjhdby Status: ready -->
+<!-- EN-Revision: 349972 Maintainer: rjhdby Status: ready -->
 <!-- Reviewed: yes -->

 <refentry xml:id="function.password-hash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -183,6 +183,43 @@
   </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>
+       Добавлена поддержка алгоритма хеширования паролей Argon2id с помощью <constant>PASSWORD_ARGON2ID</constant>.
+      </entry>
+     </row>
+     <row>
+      <entry>7.2.0</entry>
+      <entry>
+       Добавлена поддержка хеширующего алгоритма Argon2i с помощью <constant>PASSWORD_ARGON2I</constant>.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </para>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
   <para>
@@ -345,43 +382,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>
-        Добавлена поддержка алгоритма хеширования паролей Argon2id с помощью <constant>PASSWORD_ARGON2ID</constant>.
-       </entry>
-      </row>
-      <row>
-       <entry>7.2.0</entry>
-       <entry>
-        Добавлена поддержка хеширующего алгоритма Argon2i с помощью <constant>PASSWORD_ARGON2I</constant>.
-       </entry>
-      </row>
-     </tbody>
-    </tgroup>
-   </informaltable>
-  </para>
- </refsect1>
-
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>

Modified: phpdoc/ru/trunk/reference/password/functions/password-needs-rehash.xml
===================================================================
--- phpdoc/ru/trunk/reference/password/functions/password-needs-rehash.xml	2020-05-24 16:55:35 UTC (rev 349974)
+++ phpdoc/ru/trunk/reference/password/functions/password-needs-rehash.xml	2020-05-25 04:07:10 UTC (rev 349975)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 349903 Maintainer: rjhdby Status: ready -->
+<!-- EN-Revision: 349972 Maintainer: rjhdby Status: ready -->
 <!-- Reviewed: yes -->

 <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';
-
-// Параметр стоимости может изменяться в связи со сменой оборудования
-$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';
+
+// Параметр стоимости может изменяться в связи со сменой оборудования
+$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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.