A Note To hash_pbkdf2 in PHP
Please pay great attention to the $length parameter! It is exactly the return string length, NOT the length of raw binary hash result.
I had a big problem about this --I thought that hash_pbkdf2(...false) should equals to bin2hex(hash_pbkdf2(...true)) just like md5($x) equals bin2hex(md5($x, true)). However I was wrong:
阅读全文...