Last active
October 6, 2022 11:51
-
-
Save firaja/7fb259db65fd18e9533d1fd28534bed7 to your computer and use it in GitHub Desktop.
Password4j - Verify scrypt hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScryptFunction scrypt = ScryptFunction.getInstance(1<<16, 8, 1); | |
boolean verified = Password.check("my password", "$100801$cHJpdmF0ZS1zYWx0$ibAGantBIzk0Zcpl11VLaywBOdVA4mgrwTkIxWbNYBsIDROtTIMGULxMS9AJj7MOs74D/fQk6WtodZ1115i5wg==") | |
.addPepper("shared-secret") | |
.with(scrypt); | |
// true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment