Mitigate potential DoS attacks against hash_pbkdf2()

Related: #3720
2 files changed