diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-12-18 20:38:40 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-12-20 14:31:07 +0100 |
commit | d59bc8078291883f1dc010a38c234600c17d0385 (patch) | |
tree | 51c3bc32ed71e959dccfb778a297bfb8bf06f259 /ext/hash | |
parent | ca6c54274cb039f4a86f02c421a91c2cfa8f73b4 (diff) | |
download | php-git-d59bc8078291883f1dc010a38c234600c17d0385.tar.gz |
Fix smaller issues with stubs
GH-5025
Diffstat (limited to 'ext/hash')
-rw-r--r-- | ext/hash/hash.c | 2 | ||||
-rw-r--r-- | ext/hash/hash.stub.php | 4 | ||||
-rw-r--r-- | ext/hash/hash_arginfo.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 94d673ada2..38a32803f4 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -1329,7 +1329,7 @@ static const zend_function_entry hash_functions[] = { PHP_FE(hash_copy, arginfo_hash_copy) PHP_FE(hash_algos, arginfo_hash_algos) - PHP_FE(hash_hmac_algos, arginfo_hash_algos) + PHP_FE(hash_hmac_algos, arginfo_hash_hmac_algos) PHP_FE(hash_pbkdf2, arginfo_hash_pbkdf2) PHP_FE(hash_equals, arginfo_hash_equals) PHP_FE(hash_hkdf, arginfo_hash_hkdf) diff --git a/ext/hash/hash.stub.php b/ext/hash/hash.stub.php index d874a0ab18..f17084db1d 100644 --- a/ext/hash/hash.stub.php +++ b/ext/hash/hash.stub.php @@ -24,13 +24,15 @@ function hash_copy(HashContext $context): HashContext {} function hash_algos(): array {} +function hash_hmac_algos(): array {} + function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $raw_output = false): string {} /** * @param $known_string no type juggling is performed * @param $user_string no type juggling is performed */ -function hash_equals(string $known_string, string $user_string) : bool {} +function hash_equals(string $known_string, string $user_string): bool {} function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string {} diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index 41d22f4a8e..27083f35bd 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -56,6 +56,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_algos, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() +#define arginfo_hash_hmac_algos arginfo_hash_algos + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) |