[DOC-CVS] [doc-en] master: new constants for xpass 1.2.0 (#5099)

[email protected] (Remi Collet via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Remi Collet (remicollet)
Committer: GitHub (web-flow)
Pusher: remicollet
Date: 2026-01-15T06:54:13+01:00

Commit: https://github.com/php/doc-en/commit/1526b45ee5f999aec9c29680e4a5e24f6615ad3f
Raw diff: https://github.com/php/doc-en/commit/1526b45ee5f999aec9c29680e4a5e24f6615ad3f.diff

new constants for xpass 1.2.0 (#5099)

Changed paths:
  M  reference/xpass/constants.xml


Diff:

diff --git a/reference/xpass/constants.xml b/reference/xpass/constants.xml
index a2763165b4bd..fe9989e0cb40 100644
--- a/reference/xpass/constants.xml
+++ b/reference/xpass/constants.xml
@@ -157,6 +157,45 @@
     </simpara>
    </listitem>
   </varlistentry>
+  <varlistentry xml:id="constant.crypt-prefix-sm3crypt">
+   <term>
+    <constant>CRYPT_PREFIX_SM3CRYPT</constant>
+    (<type>string</type>)
+   </term>
+   <listitem>
+    <simpara>
+     A hash based on the ShangMi 3 hash function with 256-bit output,
+     that uses the same design as sha256crypt and/or sha512crypt.
+     Supported on EulerOS, Kylin, openEuler, and openKylin, but not common
+     elsewhere. Acceptable for new hashes where required. The default
+     processing cost parameter is 5000, which is too low for modern hardware.
+    </simpara>
+    <simpara>
+     Available as of 1.2.0 with libcxcrypt &gt;= 4.5.0.
+    </simpara>
+   </listitem>
+  </varlistentry>
+  <varlistentry xml:id="constant.crypt-prefix-sm3-yescrypt">
+   <term>
+    <constant>CRYPT_PREFIX_SM3_YESCRYPT</constant>
+    (<type>string</type>)
+   </term>
+   <listitem>
+    <simpara>
+     Sm3-yescrypt uses the output from yescrypt as an input message to HMAC
+     with the ShangMi 3 hash function with a 256-bit digest. Thus, yescrypt's
+     cryptographic properties are superseded by those of the ShangMi 3 hash
+     function. This hashing method is useful in applications that need modern
+     passphrase hashing, but have to rely on algorithms approved by the Chinese
+     Office of State Commercial Cryptography Administration (OSCCA). The ShangMi
+     3 hash function has been published in Part 3: "Dedicated hash-functions"
+     of the ISO/IEC 10118-3:2018. Acceptable for new hashes where required.
+    </simpara>
+    <simpara>
+     Available as of 1.2.0 with libcxcrypt &gt;= 4.5.0.
+    </simpara>
+   </listitem>
+  </varlistentry>
  </variablelist>
 
  <variablelist xml:id="xpass.constants.error">
@@ -228,7 +267,7 @@
    <listitem>
     <simpara>
      <constant>PASSWORD_SHA512</constant> is used to create new password
-     hashes using the <constant>CRYPT_SHA512</constant> algorithm.
+     hashes using the <constant>CRYPT_PREFIX_SHA512</constant> algorithm.
     </simpara>
    </listitem>
   </varlistentry>
@@ -240,7 +279,37 @@
    <listitem>
     <simpara>
      <constant>PASSWORD_YESCRYPT</constant> is used to create new password
-     hashes using the <constant>CRYPT_YESCRYPT</constant> algorithm.
+     hashes using the <constant>CRYPT_PREFIX_YESCRYPT</constant> algorithm.
+    </simpara>
+   </listitem>
+  </varlistentry>
+  <varlistentry xml:id="constant.password-sm3crypt">
+   <term>
+    <constant>PASSWORD_SM3CRYPT</constant>
+    (<type>string</type>)
+   </term>
+   <listitem>
+    <simpara>
+     <constant>PASSWORD_SM3CRYPT</constant> is used to create new password
+     hashes using the <constant>CRYPT_PREFIX_SM3CRYPT</constant> algorithm.
+    </simpara>
+    <simpara>
+     Available as of 1.2.0 with libcxcrypt &gt;= 4.5.0.
+    </simpara>
+   </listitem>
+  </varlistentry>
+  <varlistentry xml:id="constant.password-sm3-yescrypt">
+   <term>
+    <constant>PASSWORD_SM3_YESCRYPT</constant>
+    (<type>string</type>)
+   </term>
+   <listitem>
+    <simpara>
+     <constant>PASSWORD_SM3_YESCRYPT</constant> is used to create new password
+     hashes using the <constant>CRYPT_PREFIX_SM3_YESCRYPT</constant> algorithm.
+    </simpara>
+    <simpara>
+     Available as of 1.2.0 with libcxcrypt &gt;= 4.5.0.
     </simpara>
    </listitem>
   </varlistentry>
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.