Skip to content

Commit 6055b72

Browse files
committed
UPGRADING: Add note about xxHash secret and fix a typo
[ci skip] Signed-off-by: Anatol Belski <ab@php.net>
1 parent 20501c7 commit 6055b72

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

UPGRADING

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ PHP 8.1 UPGRADE NOTES
166166
echo $h, "\n";
167167
```
168168

169+
Secret usage is supported through passing the `secret` key in the `$options` array, too:
170+
171+
```php
172+
$h = hash("xxh3", $data, options: ["secret" => "at least 136 bytes long secret here"]);
173+
echo $h, "\n";
174+
```
175+
176+
Note, that the quality of the custom secret is crucial for the quality of the resulting hash. It is
177+
highly recommended for the secret to use the best possible entropy.
178+
169179
- PDO SQLite:
170180
. SQLite's "file:" DSN syntax is now supported, which allows specifying
171181
additional flags. This feature is not available if open_basedir is set.

UPGRADING.INTERNALS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ PHP 8.1 INTERNALS UPGRADE NOTES
2222
a. ext/hash
2323
- The init signatures are extended with an additional `HashTable*`
2424
argument. The passed HT is to contain the algorithm specific
25-
configuration. If the an algorithm doesn't make use of any
26-
additional configuration, the argument is to be marked with
27-
ZEND_ATTRIBUTE_UNUSED.
25+
configuration. If an algorithm doesn't make use of any additional
26+
configuration, the argument is to be marked with ZEND_ATTRIBUTE_UNUSED.
2827

2928
b. ext/pdo
3029
- The "preparer" callback now accepts a zend_string* instead of

0 commit comments

Comments
 (0)