php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch crack-check-alternative-signature for crack Bug #69562

Patch version 2015-05-02 13:37 UTC

Return to Bug #69562 | Download this patch
Patch Revisions:

Developer: cmb@php.net

Index: en/reference/crack/functions/crack-check.xml
===================================================================
--- en/reference/crack/functions/crack-check.xml	(revision 336708)
+++ en/reference/crack/functions/crack-check.xml	(working copy)
@@ -16,10 +16,14 @@
   <methodsynopsis>
    <type>bool</type><methodname>crack_check</methodname>
    <methodparam><type>string</type><parameter>password</parameter></methodparam>
+   <methodparam><type>string</type><parameter>username</parameter><initializer>""</initializer></methodparam>
+   <methodparam><type>string</type><parameter>gecos</parameter><initializer>""</initializer></methodparam>
+   <methodparam><type>resource</type><parameter>dictionary</parameter><initializer>&null;</initializer></methodparam>
   </methodsynopsis>
   <para> 
    Performs an obscure check with the given password on the specified
-   dictionary.
+   dictionary. The alternative signature also takes into account the username
+   and the GECOS information.
   </para>
   &warn.experimental.func;
  </refsect1>
@@ -40,10 +44,26 @@
      <term><parameter>password</parameter></term>
      <listitem>
       <para>
-       The tested password.
+       The password to be checked.
       </para>
      </listitem>
     </varlistentry>
+    <varlistentry>
+     <term><parameter>username</parameter></term>
+     <listitem>
+      <para>
+       The username of the account with the password.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>gecos</parameter></term>
+     <listitem>
+      <para>
+       The GECOS information associated with the user account.
+      </para>
+     </listitem>
+    </varlistentry>
    </variablelist>
   </para>
  </refsect1>
@@ -53,6 +73,33 @@
    Returns &true; if <parameter>password</parameter> is strong, or &false; 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>0.3</entry>
+       <entry>
+        The <parameter>username</parameter>, <parameter>gecos</parameter> and
+        <parameter>dictionary</parameter> parameters were added to the
+        alternative signature.
+       </entry>
+      </row>
+     </tbody>
+    </tgroup>
+   </informaltable>
+  </para>
+ </refsect1>
+
 </refentry>
 
 <!-- Keep this comment at the end of the file
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 09:03:35 2021 UTC