diff options
author | Andrew Dolgov <[email protected]> | 2022-07-12 22:26:21 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-07-12 22:26:21 +0300 |
commit | 80d3db1dcf8fe9ca66d4e3f2e2116d3bc39ae2b4 (patch) | |
tree | 04b33bfb9c9368c4a31e287153abec690b9014e0 /vendor/thecodingmachine/safe/generated/hash.php | |
parent | 4b6161892000cb2b8392dce92a9cf2cabdf2d20e (diff) |
upgrade idiorm to php8.1-patched version (aaronpk/idiorm)
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/hash.php')
-rw-r--r-- | vendor/thecodingmachine/safe/generated/hash.php | 18 |
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(); } |