Guest User

php password_hash benchmark

a guest
Jun 21st, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. php -r "$cost = 3; do { $r = microtime(true); password_hash($r, PASSWORD_DEFAULT, ['cost'=>++$cost]); printf('%-10s %.5F' . PHP_EOL, $cost, $r = microtime(true) - $r); } while ($r < 8);"
  2.  
  3. 4 0.00191
  4. 5 0.00257
  5. 6 0.00493
  6. 7 0.00955
  7. 8 0.01842
  8. 9 0.03663
  9. 10 0.07323
  10. 11 0.14599
  11. 12 0.29214
  12. 13 0.58401
  13. 14 1.16794
  14. 15 2.33511
  15. 16 4.66735
  16. 17 9.33500
Advertisement
Add Comment
Please, Sign In to add comment