History log of /PHP-8.1/ext/hash/hash.stub.php (Results 1 – 23 of 23)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 7cae6eb8 17-Jul-2023 Ilija Tovilo

Fix hash_pbkdf2 options parameter

The value needs to be initialized to NULL as it is optional. Furthermore, the
parameter was completely missing in the stub signature.

Closes GH

Fix hash_pbkdf2 options parameter

The value needs to be initialized to NULL as it is optional. Furthermore, the
parameter was completely missing in the stub signature.

Closes GH-11731

show more ...


Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1
# a6ddd1a1 26-Dec-2021 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file


# fd3fc5c1 25-Dec-2021 Christoph M. Becker

Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file

Like `hash_file()`, `hash_hmac_file()` expects a filename, and not some
string data. Fixing this now, constitutes

Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file

Like `hash_file()`, `hash_hmac_file()` expects a filename, and not some
string data. Fixing this now, constitutes a (hopefully small) BC break
though.

Closes GH-7828.

show more ...

# a708db9c 12-Dec-2021 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix GH-7759: Incorrect return types for hash() and hash_hmac()


# 0b3a9376 11-Dec-2021 Christoph M. Becker

Fix GH-7759: Incorrect return types for hash() and hash_hmac()

`hash()` and `hash_hmac()` never return `false`; only `hash_file()` and
`hash_hmac_file()` return `false` in case the data

Fix GH-7759: Incorrect return types for hash() and hash_hmac()

`hash()` and `hash_hmac()` never return `false`; only `hash_file()` and
`hash_hmac_file()` return `false` in case the data cannot be read.

Closes GH-7760.

show more ...

Revision tags: php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31
# fdc60829 26-Aug-2021 Máté Kocsis

Generate optimizer func info from stubs for various extensions (#7409)

ext/hash, ext/iconv, ext/mbstring, ext/xml, ext/zlib

Revision tags: php-7.3.30
# bf0c1ce1 08-Jul-2021 Nikita Popov

Deprecate mhash

Deprecate mhash(), mhash_keygen_s2k(), mhash_count(),
mhash_get_block_size() and mhash_get_hash_name() in favor of the
normal hash_*() functions.

Part of htt

Deprecate mhash

Deprecate mhash(), mhash_keygen_s2k(), mhash_count(),
mhash_get_block_size() and mhash_get_hash_name() in favor of the
normal hash_*() functions.

Part of https://wiki.php.net/rfc/deprecations_php_8_1.

show more ...

Revision tags: php-7.3.29, php-7.3.28
# 99b08ac2 08-Feb-2021 Máté Kocsis

Implicitly enable function entry generation when class entry generation is enabled

Closes GH-6675

# 98fb565c 05-Feb-2021 Máté Kocsis

Generate class entries from stubs for another batch of extensions

Closes GH-6669

Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1
# 110b4e90 02-Nov-2020 Anatol Belski

hash: Support custom algo parameters

The concrete need on this change is to support passing an initial seed
to the murmur hash. Passing a custom seed is important in terms of
randomi

hash: Support custom algo parameters

The concrete need on this change is to support passing an initial seed
to the murmur hash. Passing a custom seed is important in terms of
randomizing the hash function.

The suggested implementation adds a HashTable parameter to all the
init callbacks. Further on, an array with custom arguments is accepted
from `hash` or `hash_init` from the user land. Currently several things
like `hash_hkdf` are not touched, as they don't need passing custom
args.

Some convenience macros have been added to the SHA/MD families of
functions, so the consuming code doesn't have to be changed widely.

Another way to implement this is to add another type of the init that
would accept a HT with arguments. However, that would still require
touching all the context structs in all the algos. That would also
increase the size of those structs. As an init function is called just
once, the way of modifying the existing init callback has been seen
as more preferrable.

Closes GH-6400.

Signed-off-by: Anatol Belski <ab@php.net>
Co-Developed-by: Nikita Popov <nikita.ppv@googlemail.com>
Signed-off-by: Nikita Popov <nikita.ppv@googlemail.com>
Acked-by: Michael Wallner <mike@php.net>
Reviewed-by: Máté Kocsis <kocsismate@woohoolabs.com>
Reviewed-by: Eddie Kohler <ekohler@gmail.com>

show more ...

Revision tags: php-7.3.24, php-7.3.24RC1
# 68195bd4 06-Oct-2020 Nikita Popov

Update ext/spl parameter names

Closes GH-6284.

Revision tags: php-7.3.23
# 9d9bcc2b 17-Sep-2020 Máté Kocsis

Improve parameter names in ext/hash and ext/openssl

Closes GH-6156

# de912821 16-Sep-2020 Máté Kocsis

Display string default values in stubs more uniformly

Settling on using quoted string

Revision tags: php-7.3.23RC1, php-7.3.22, php-7.3.22RC1
# f83368c6 13-Aug-2020 Máté Kocsis

Fix ZPP for mhash()

Closes GH-5985

Revision tags: php-7.3.21
# 0d330e1a 28-Jul-2020 Máté Kocsis

Add a few missing parameter types in stubs

Related to GH-5627

Revision tags: php-7.3.21RC1, php-7.3.20, php-7.3.20RC1, php-7.3.19
# ada776c8 08-Jun-2020 Eddie Kohler

Make HashContexts serializable.

* Modify php_hash_ops to contain the algorithm name and
serialize and unserialize methods.

* Implement __serialize and __unserialize magic meth

Make HashContexts serializable.

* Modify php_hash_ops to contain the algorithm name and
serialize and unserialize methods.

* Implement __serialize and __unserialize magic methods on
HashContext.

Note that serialized HashContexts are not necessarily portable
between PHP versions or from architecture to architecture.
(Most are, though Keccak and slow SHA3s are not.)

An exception is thrown when an unsupported serialization is
attempted.

Because of security concerns, HASH_HMAC contexts are not
currently serializable; attempting to serialize one throws
an exception.

Serialization exposes the state of HashContext memory, so ensure
that memory is zeroed before use by allocating it with a new
php_hash_alloc_context function. Performance impact is
negligible.

Some hash internal states have logical pointers into a buffer,
or sponge, that absorbs input provided in bytes rather than
chunks. The unserialize functions for these hash functions
must validate that the logical pointers are all within bounds,
lest future hash operations cause out-of-bounds memory accesses.

* Adler32, CRC32, FNV, joaat: simple state, no buffer positions
* Gost, MD2, SHA3, Snefru, Tiger, Whirlpool: buffer positions
must be validated
* MD4, MD5, SHA1, SHA2, haval, ripemd: buffer positions encoded
bitwise, forced to within bounds on use; no need to validate

show more ...

Revision tags: php-7.4.7RC1, php-7.3.19RC1
# ed6cf678 19-May-2020 Máté Kocsis

Fix some final classes in stubs

# 3ebce8e9 02-May-2020 Máté Kocsis

Fix UNKNOWN default values in various extensions

Closes GH-5514

Revision tags: php-7.3.18RC1, php-7.2.30, php-7.3.17
# 5322de1b 04-Apr-2020 Máté Kocsis

Generate functions entries from stubs for another set of extensions

Closes GH-5351

Revision tags: php-7.3.17RC1, php-7.3.18, php-7.3.16, php-7.3.16RC1, php-7.3.15RC1, php-7.3.15, php-7.3.14, php-7.3.14RC1
# d59bc807 18-Dec-2019 Máté Kocsis

Fix smaller issues with stubs

GH-5025

Revision tags: php-7.3.13, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6
# 27e83d0f 08-Nov-2019 Máté Kocsis

Add union return types for function stubs

Revision tags: php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1
# 5f80eb78 07-Oct-2019 Nikita Popov

Fix required number of arguments in stubs

* get_parent_class() argument is optional
* Mark array_filter() $callback as optional
* The $base of gmp_strval() is optional
* DateTime

Fix required number of arguments in stubs

* get_parent_class() argument is optional
* Mark array_filter() $callback as optional
* The $base of gmp_strval() is optional
* DateTime constructor also accepts zero arguments
* hash_update_file() stream context is optional
* xmlwriter_write_dtd_entity() $isparam argument is optional

show more ...

Revision tags: php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2
# ef27bd60 15-Sep-2019 Thomas Gerbet

Add stubs for ext-hash