Sara Golemon
a6e4a713ea
Add hash_hmac_algos() for filtered is_crypto methods
2017-07-23 15:17:09 -04:00
Remi Collet
c6c654c303
fix hash build (when build dir != src dir)
2017-05-29 09:55:51 +02:00
Anatol Belski
85b0b8a739
fix typo
2017-05-28 21:15:52 +02:00
Christian Schneider
91663a92d1
Replace slow generic sha3 implementation by https://github.com/gvanas/KeccakCodePackage
...
Fix hash_copy() tests by using correct size for sha3 context
sync config.w32 with with new sha3 files
Move dependency on KeccakHash.h to hash_sha3.c so we do not rely on it to install php_hash_sha3.h
Allocate memory for KeccacInstance in hash_sha3.c so header files do not need to know about implementation details while keeping API backward compatible to original sha3 implementation
Fix memory leak because hash_copy is called after init which already allocates the hashinstance
2017-05-28 12:50:33 +02:00
Nikita Popov
1817a8622d
Merge branch 'PHP-7.1'
2017-02-24 23:22:46 +01:00
Nikita Popov
f678b0eae2
Merge branch 'PHP-7.0' into PHP-7.1
2017-02-24 23:22:24 +01:00
Grundik
eac8166bd4
Fix bug #73127
...
gost-crypto hash was incorrect if input data contained long 0xFF
sequence, due to a carry-propagation bug.
2017-02-24 23:20:49 +01:00
Nikita Popov
c61daf415d
Deprecate track_errors / $php_errormsg
2017-02-03 21:02:52 +01:00
Anatol Belski
17f6f713ad
fix test portability
2017-02-01 12:18:55 +01:00
=?UTF-8?q?Rouven=20We=C3=9Fling?=
b7f59be9f4
Refactor HashContext into an object.
...
This allows better type hinting as well as potentially adding
methods in a followup diff.
Original patch by Rouven Weßling (github.com/realityking)
Heavily modified by Sara Golemon (github.com/sgolemon)
2017-01-31 19:28:35 -08:00
Sara Golemon
f149f62d58
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Securely zero the hash context key
2017-01-30 09:03:01 -08:00
Sara Golemon
3475c0c035
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Securely zero the hash context key
2017-01-30 09:02:42 -08:00
Sara Golemon
bf0f53270f
Securely zero the hash context key
2017-01-30 08:57:17 -08:00
Andrey Andreev
423c192791
Use hash_ops->is_crypto in hash_init()
2017-01-22 10:37:10 +01:00
Joe Watkins
1c807377fd
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fix bug #73961 environmental build dependency in hash sha3 source
2017-01-21 07:46:52 +00:00
Joe Watkins
1ff27053f9
Fix bug #73961 environmental build dependency in hash sha3 source
2017-01-21 07:45:28 +00:00
Andrey Andreev
d89d149edf
Disallow non-crypto hashes in HMAC and PBKDF2
...
For this purpose add is_crypto flag to php_hash_ops.
2017-01-18 21:13:54 +01:00
Nikita Popov
a3115b05b4
Merge branch 'PHP-7.1'
2017-01-14 13:28:52 +01:00
Andrey Andreev
4bf7ef0806
Add hash_hkdf()
2017-01-14 13:28:21 +01:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Pedro Magalhães
9c5af4e4cb
Remove the b prefix from literals on unrelated tests
2016-11-20 21:11:53 +01:00
Sara Golemon
65d7bbaddc
Change Big Endian backup implementations to use signed indexes
...
load64() counted down from 7..0, but the decrement turned 0 into 255.
This means the loop would never terminate on Big Endian systems.
Just use signed char integers since we're only dealing with values from 0..7 anyway.
Closes https://bugs.php.net/bug.php?id=73282
2016-11-01 09:35:54 -07:00
Christoph M. Becker
35b19cd2d9
Make this test meaningful
...
We're not only checking that hash_update_file() succeeds, but rather
that it properly works.
Furthermore, we fix the SKIPIF section – we don't need mhash to run the
test, and we don't need to check for unsupported PHP versions.
We also shorten the test name to avoid cluttering the test reports with
unnecessary detail.
2016-10-18 14:57:41 +02:00
Joe Watkins
dcae3ce1e6
Merge branch 'pull-request/1817'
2016-10-17 17:02:22 +01:00
Joe Watkins
4dfd5f4403
Merge branch 'pull-request/1816'
2016-10-17 17:02:19 +01:00
Joe Watkins
39ee3184ee
Merge branch 'pull-request/1817'
2016-10-17 17:01:39 +01:00
Joe Watkins
5eb84337a6
Merge branch 'pull-request/1816'
2016-10-17 17:01:28 +01:00
Joe Watkins
acefa44014
Merge branch 'pull-request/1816'
2016-10-17 16:50:12 +01:00
Joe Watkins
f9beeacc25
Merge branch 'pull-request/1817'
2016-10-17 16:49:24 +01:00
Sara Golemon
b041bebb88
Change Big Endian backup implementations to use signed indexes
...
load64() counted down from 7..0, but the decrement turned 0 into 255.
This means the loop would never terminate on Big Endian systems.
Just use signed char integers since we're only dealing with values from 0..7 anyway.
Closes https://bugs.php.net/bug.php?id=73282
2016-10-11 20:43:02 -07:00
Dmitry Stogov
323b2733f6
Fixed compilation warnings
2016-06-22 00:40:50 +03: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
marcosptf
547118e2f1
test to function hash_update_file();
...
was added new test to uncoverage function from hash module
2016-03-13 14:14:03 -03:00
marcosptf
e609b05d5b
Update hash_update_stream.phpt
2016-03-13 14:00:01 -03:00
marcosptf
1b683c34ae
test to function hash_update_stream();
...
was added a new function to module hash
2016-03-13 12:46:48 -03:00
Rouven Weßling
7e0459e7ce
Replace usage of php_hash_uint32 and php_hash_uint64 with uint32_t and uint64_t.
...
Remove the unused php_hash_int32 and php_hash_int64.
2016-02-04 11:57:41 +01:00
Nikita Popov
93dc91b386
Remove version checks
...
PHP_VERSION_ID
PHP_API_VERSION
ZEND_MODULE_API_NO
PHP_MAJOR_VERSION, PHP_MINOR_VERSION
ZEND_ENGINE_2
I've left litespeed alone, as it seems to genuinely maintain support
for many PHP versions.
2016-01-30 15:35:28 +01:00
Lior Kaplan
71c1980025
Happy new year (Update copyright to 2016)
2016-01-01 20:06:12 +02:00
Lior Kaplan
3d5438bf7b
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Update header to PHP Version 7
Happy new year (Update copyright to 2016)
Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf
Happy new year (Update copyright to 2016)
2016-01-01 19:21:47 +02:00
Xinchen Hui
9c1d0946f4
It should not be const
2015-10-27 10:08:27 +08:00
Xinchen Hui
69beb29e15
Fixed Bug #70797 (Error while making PHP7)
...
error: ‘for’ loop initial declarations are only allowed in C99 mode
2015-10-27 10:06:22 +08:00
Kalle Sommer Nielsen
b26593628f
Fix build on Windows
2015-10-22 03:47:46 +02:00
Stanislav Malyshev
af68b3ad5f
Fix undefined symbol error when compiling with LLVM
...
Basically, LLVM in default mode treats inline in a way incompatible
with GCC in c89 mode, which leads to undefined symbol errors.
See more here: http://stackoverflow.com/questions/12844729/linking-error-for-inline-functions
2015-10-16 17:23:18 -07:00
Anatol Belski
1b72ddf0d0
sync config.w32 with sha3 implementation
2015-10-16 12:18:35 +02:00
Sara Golemon
e800da9920
Add missing NEWS entry, copyright notice, and vim settings
...
Should have gone with d244b54c67
2015-10-16 00:19:00 -07:00
Sara Golemon
d244b54c67
Implement SHA3 hashing algorithm
2015-10-15 20:36:49 -07:00