<?php $timeTarget = 0.350; // 350 ms $cost = 4; // lowest do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); } while (($end - $start) < $timeTarget); echo "Appropriate Cost Found: " . $cost; // < 11 is not enough
You have javascript disabled. You will not be able to edit any code.