Skip to content

Instantly share code, notes, and snippets.

@firaja
Created October 6, 2022 09:49
Show Gist options
  • Save firaja/12d80f8cef3a88a9866b448c21dbafb8 to your computer and use it in GitHub Desktop.
Save firaja/12d80f8cef3a88a9866b448c21dbafb8 to your computer and use it in GitHub Desktop.
Password4j - determine bcrypt parameters
int minimumTime = 1500;
BenchmarkResult<BcryptFunction> benchmark = SystemChecker.benchmarkBcrypt(minimumTime);
benchmark.getElapsed(); // 929ms
benchmark.getPrototype(); // BcryptFunction object with 14 rounds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment