summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2021-02-21 13:33:21 +0100
committerAnatol Belski <ab@php.net>2021-02-21 13:36:28 +0100
commit6055b72d0eaabdf164857255640e1808b433fed9 (patch)
treeee234423fdbb5999a47d8eaca2cccd7e398e24ba
parent20501c72c838e2adfbc8591e270ebbd67b22f400 (diff)
downloadphp-git-6055b72d0eaabdf164857255640e1808b433fed9.tar.gz
UPGRADING: Add note about xxHash secret and fix a typo
[ci skip] Signed-off-by: Anatol Belski <ab@php.net>
-rw-r--r--UPGRADING10
-rw-r--r--UPGRADING.INTERNALS5
2 files changed, 12 insertions, 3 deletions
diff --git a/UPGRADING b/UPGRADING
index 0bc8f81808..eb01058a5a 100644
--- 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.
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 39b26f3dae..8c001a67e7 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -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