xref: /PHP-8.2/ext/hash/tests/bug64745.phpt (revision d679f022)
1--TEST--
2Bug #64745 (hash_pbkdf2() truncates data when using default length and hex output)
3--FILE--
4<?php
5$hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0);
6$rawHash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0, true);
7
8var_dump($hash);
9var_dump(bin2hex($rawHash));
10
11?>
12--EXPECT--
13string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6"
14string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6"
15