summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/generated/hash.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/hash.php')
-rw-r--r--vendor/thecodingmachine/safe/generated/hash.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/vendor/thecodingmachine/safe/generated/hash.php b/vendor/thecodingmachine/safe/generated/hash.php
index 2c327c0e3..5acbc2670 100644
--- a/vendor/thecodingmachine/safe/generated/hash.php
+++ b/vendor/thecodingmachine/safe/generated/hash.php
@@ -16,7 +16,7 @@ use Safe\Exceptions\HashException;
*
*
* Non-cryptographic hash functions are not allowed.
- * @param string $ikm Input keying material (raw binary). Cannot be empty.
+ * @param string $key Input keying material (raw binary). Cannot be empty.
* @param int $length Desired output length in bytes.
* Cannot be greater than 255 times the chosen hash function size.
*
@@ -31,10 +31,10 @@ use Safe\Exceptions\HashException;
* @throws HashException
*
*/
-function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string
+function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string
{
error_clear_last();
- $result = \hash_hkdf($algo, $ikm, $length, $info, $salt);
+ $result = \hash_hkdf($algo, $key, $length, $info, $salt);
if ($result === false) {
throw HashException::createFromPhpError();
}
@@ -45,16 +45,20 @@ function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = ''
/**
*
*
- * @param \HashContext $hcontext Hashing context returned by hash_init.
+ * @param \HashContext $context Hashing context returned by hash_init.
* @param string $filename URL describing location of file to be hashed; Supports fopen wrappers.
- * @param \HashContext|null $scontext Stream context as returned by stream_context_create.
+ * @param \HashContext|null $stream_context Stream context as returned by stream_context_create.
* @throws HashException
*
*/
-function hash_update_file(\HashContext $hcontext, string $filename, ?\HashContext $scontext = null): void
+function hash_update_file(\HashContext $context, string $filename, ?\HashContext $stream_context = null): void
{
error_clear_last();
- $result = \hash_update_file($hcontext, $filename, $scontext);
+ if ($stream_context !== null) {
+ $result = \hash_update_file($context, $filename, $stream_context);
+ } else {
+ $result = \hash_update_file($context, $filename);
+ }
if ($result === false) {
throw HashException::createFromPhpError();
}