1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

14 Commits

Author SHA1 Message Date
Anatol Belski
23590f7c53 hash: Implement xxHash
The implementation bundles the xxHash v0.8.0 release and includes all the variants

- xxh32, 32-bit wide
- xxh64, 64-bit wide
- xxh3, 64-bit wide
- xxh128, 128-bit wide

An initial hash state can be passed through the options arrray. An additional
functionality not targeted in this implementation is the secret support in xxh3
and xxh128. That can be added at a later point.

The serialization for xxh3 and xxh128 should not be implemented, as the
state would contain the secret. Despite the xxHash is a non crypto
algorithm, the secret would be serialized as plain text which would be
insecure.

Closes GH-6524

Signed-off-by: Anatol Belski <ab@php.net>
2021-01-09 19:35:32 +01:00
Anatol Belski
72e91e9fc8 hash: Add MurmurHash3 with streaming support
The implementation is based on the upstream PMurHash. The following
variants are implemented

- murmur3a, 32-bit hash
- murmur3c, 128-bit hash for x86
- murmur3f, 128-bit hash for x64

The custom seed support is not targeted by this implementation. It will
need a major change to the API, so then custom arguments can be passed
through `hash_init`. For now, the starting hash is always zero.

Fixes bug #68109, closes #6059

Signed-off-by: Anatol Belski <ab@php.net>
Co-Developed-by: Michael Wallner <mike@php.net>
Signed-off-by: Michael Wallner <mike@php.net>
2020-10-31 16:44:18 +01:00
Máté Kocsis
b5c7a83dca Remove unnecessary PHPDoc-alike blocks from tests
Closes GH-5759
2020-06-24 13:13:44 +02:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Andrew Brampton
c79ce48ddb Fix #71890: Add support for crc32c Castagnoli's polynomial.
This variant of crc32 is heavily used by storage systems, such as iSCSI, SCTP,
Btrfs, ext4, and is increasingly being used in API (such as Google Cloud
Storage, and Apache Kafka).
2019-03-11 10:19:35 +01:00
Gabriel Caruso
9c144e0d82 Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Kalle Sommer Nielsen
f73c0102d6 Update hash tests for consistency in their titles and remove the skipif sections (except for the mhash related tests) 2018-10-03 08:48:11 +02:00
Sara Golemon
49a7be0697 Implement FIPS 180-4 algos: sha512/256 and sha512/224
These algorithms are simple extensions to the existing sha512 algo
using different initialization vectors and producing truncated output.
2016-05-14 04:39:39 +00:00
Sara Golemon
d244b54c67 Implement SHA3 hashing algorithm 2015-10-15 20:36:49 -07:00
Michael M Slusarz
b88387d341 Fix #66698: Add fnv1a32 and fnv1a64 hash options 2014-03-06 23:38:51 +01:00
Manuel Mausz
7dbb1bba64 fix failing tests 2013-09-05 09:32:12 +02:00
Michael Wallner
2d2aefe414 remove Salsa10/Salsa20, which are actually stream ciphers not hash functions 2012-01-17 16:35:32 +00:00
Martin Jansen
3842a993fe Added Jenkins's one-at-a-time hash support to ext/hash. 2010-03-24 15:47:40 +00:00
andy wharmby
c41cc6aaed New hash extension tests. Tested on Windows, Linux and Linux 64-bit 2009-01-07 14:32:46 +00:00