-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify function always return true, am I doing wrong? #16
Comments
Hi @RasyiidWho, what happens if you do something like this? Hash hash = Password.hash("uwu").withBCrypt();
boolean verified = Password.check("wrong password", hash.getResult()).withBCrypt();
if(verified)
{
// Print "OK"
}
else
{
// Print "KO"
} What are the configurations in your |
I have tried using this code
but still gives me same result (always return true)
I'm on Android Studio IDE with gradle as a build tool. I've try to put
I tried your code in NetBeans IDE, and it's working well, so it only happen on Android, even not all Android phone have this issue |
On which Android devices is working? Do they have something in common? |
I have test in on 3 phones. There are 2 physical device (android 10 & 6) and 1 emulator device (android 10). And this problem only happend in 1 physical device that have android 10. |
I've tried the following in a plugins {
id 'java'
id 'application'
}
applicationDefaultJvmArgs = ["-Dpsw4j.configuration=/path/to/file.properties"]
And the file is correctly read on Unix systems. On Windows I suggest to to not escape You should also check on your device if there's some known problem with the generation of random bytes. global.random.strong=true This is always recommended if your JVM supports Also check if this method returns every time different results: SaltGenerator.generate(); |
Describe the bug
This issue happen in random device, verify function Password.check(password, hash).withBCrypt() always return true, even with wrong password.
To Reproduce
App with login (username & password) system.
Expected behavior
Verify function return correct value.
Environment:
OS: Windows
IDE: Android Studio 4.2 Canary 12
Device spec with working Verify function
Device spec with Verify function always return true
Other
Additional context
Here's my code and result:
Code
Result
Thankyou firaja :D
The text was updated successfully, but these errors were encountered: