]> granicus.if.org Git - php/commitdiff
UPGRADING: Add note about xxHash secret and fix a typo
authorAnatol Belski <ab@php.net>
Sun, 21 Feb 2021 12:33:21 +0000 (13:33 +0100)
committerAnatol Belski <ab@php.net>
Sun, 21 Feb 2021 12:36:28 +0000 (13:36 +0100)
[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
UPGRADING
UPGRADING.INTERNALS

index 0bc8f818085bc2aff8d2a90325dbb3e536e974a3..eb01058a5ab7a4d98ccb0170d4cb5dedae8408a2 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -166,6 +166,16 @@ PHP 8.1 UPGRADE NOTES
     echo $h, "\n";
     ```
 
+    Secret usage is supported through passing the `secret` key in the `$options` array, too:
+
+    ```php
+    $h = hash("xxh3", $data, options: ["secret" => "at least 136 bytes long secret here"]);
+    echo $h, "\n";
+    ```
+
+    Note, that the quality of the custom secret is crucial for the quality of the resulting hash. It is
+    highly recommended for the secret to use the best possible entropy.
+
 - PDO SQLite:
   . SQLite's "file:" DSN syntax is now supported, which allows specifying
     additional flags. This feature is not available if open_basedir is set.
index 39b26f3dae80c4e3517a83eab3f3f80b6b61d04d..8c001a67e7a9eb9ba84e04719f572ed863c1bb34 100644 (file)
@@ -22,9 +22,8 @@ PHP 8.1 INTERNALS UPGRADE NOTES
   a. ext/hash
     - The init signatures are extended with an additional `HashTable*`
       argument. The passed HT is to contain the algorithm specific
-      configuration. If the an algorithm doesn't make use of any
-      additional configuration, the argument is to be marked with
-      ZEND_ATTRIBUTE_UNUSED.
+      configuration. If an algorithm doesn't make use of any additional
+      configuration, the argument is to be marked with ZEND_ATTRIBUTE_UNUSED.
 
   b. ext/pdo
     - The "preparer" callback now accepts a zend_string* instead of