History log of /PHP-8.2/ext/hash/hash.stub.php (Results 1 – 25 of 28)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# e8c9c731 18-Jul-2023 Ilija Tovilo

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix hash_pbkdf2 options parameter


# 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 ...

# e328c683 19-Jul-2022 Máté Kocsis

Rename @cname to @cvalue in stubs (#9043)

@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as

Rename @cname to @cvalue in stubs (#9043)

@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.

show more ...

# 342e18f1 12-Jul-2022 Tim Düsterhus

Support the actual `#[\SensitiveParameter]` attribute in stubs (#8836)

# 0d4147f0 12-Apr-2022 Tim Düsterhus

Mark parameter in ext/hash as sensitive

# 59ae6a9f 04-Jun-2022 Máté Kocsis

Declare HASH_HMAC in stubs

# 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 ...

# 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

# 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 ...

# 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

# 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 ...

# 68195bd4 06-Oct-2020 Nikita Popov

Update ext/spl parameter names

Closes GH-6284.

# 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

# f83368c6 13-Aug-2020 Máté Kocsis

Fix ZPP for mhash()

Closes GH-5985

# 0d330e1a 28-Jul-2020 Máté Kocsis

Add a few missing parameter types in stubs

Related to GH-5627

# 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 ...

# 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

# 5322de1b 04-Apr-2020 Máté Kocsis

Generate functions entries from stubs for another set of extensions

Closes GH-5351

# d59bc807 18-Dec-2019 Máté Kocsis

Fix smaller issues with stubs

GH-5025

12