summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/generated/hash.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
committerwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
commitf6a8facfd4bfc40025c069eebc37094d826aff58 (patch)
tree871aab0d8adafe736d954cae1783c260699c0ec3 /vendor/thecodingmachine/safe/generated/hash.php
parentcd2c10f9f71409df24fc74c1bbd7d5ddbf48d991 (diff)
Bump 'spomky-labs/otphp' to 11.3.x.
This is mainly for PHP 8.4 compatibility.
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/hash.php')
-rw-r--r--vendor/thecodingmachine/safe/generated/hash.php65
1 files changed, 0 insertions, 65 deletions
diff --git a/vendor/thecodingmachine/safe/generated/hash.php b/vendor/thecodingmachine/safe/generated/hash.php
deleted file mode 100644
index 5acbc2670..000000000
--- a/vendor/thecodingmachine/safe/generated/hash.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\HashException;
-
-/**
- *
- *
- * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..)
- * See hash_algos for a list of supported algorithms.
- *
- *
- * Non-cryptographic hash functions are not allowed.
- *
- *
- *
- * Non-cryptographic hash functions are not allowed.
- * @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.
- *
- * If length is 0, the output length
- * will default to the chosen hash function size.
- * @param string $info Application/context-specific info string.
- * @param string $salt Salt to use during derivation.
- *
- * While optional, adding random salt significantly improves the strength of HKDF.
- * @return string Returns a string containing a raw binary representation of the derived key
- * (also known as output keying material - OKM);.
- * @throws HashException
- *
- */
-function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string
-{
- error_clear_last();
- $result = \hash_hkdf($algo, $key, $length, $info, $salt);
- if ($result === false) {
- throw HashException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- *
- *
- * @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 $stream_context Stream context as returned by stream_context_create.
- * @throws HashException
- *
- */
-function hash_update_file(\HashContext $context, string $filename, ?\HashContext $stream_context = null): void
-{
- error_clear_last();
- 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();
- }
-}