From 540a5a52e89fce6da19d6f79dd1eda587a25b396 Mon Sep 17 00:00:00 2001 From: Anthony Ferrara Date: Tue, 28 May 2013 15:30:45 -0400 Subject: Fix #64745 hash_pbkdf2 truncation issue When using hash_pbkdf2 with hex output and 0 length (auto), it incorrectly truncates the result to 1/2 the expected result. --- ext/hash/tests/bug64745.phpt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ext/hash/tests/bug64745.phpt (limited to 'ext/hash/tests') diff --git a/ext/hash/tests/bug64745.phpt b/ext/hash/tests/bug64745.phpt new file mode 100644 index 0000000000..427f89b728 --- /dev/null +++ b/ext/hash/tests/bug64745.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #64745 hash_pbkdf2() truncates data when using default length and hex output +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6" +string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6" + -- cgit v1.2.1