(Exception) java.lang.Exception: java.lang.IllegalArgumentException: Invalid salt revision
I created an online store (web/PHP) for a school project, now I'm assigned to make an app for it using B4A and I'm stuck with this problem.
The password is 'closa' and here is the hash:
Yeah, I forgot to include my code. But, it was just a simple code. I grab the hashed password from the database and compare it to user's input.
B4X:
Sub Process_Globals
Private Bcrypt As BCrypt
End Sub
Sub Service_Create
Bcrypt.Initialize("Bcrypt")
End Sub
Sub UserLogin
If Bcrypt.checkpw(PasswordFromInput, PasswordFromDatabase) = True Then 'I got the error from this line
'Logic here
Else
...
End Sub
I actually came up with an idea of recreating the hash using Bcrypt library and manually replace the user's passwords on the database with it so I can proceed coz I'm running out of time.
Warning
The salt option is deprecated. It is now preferred to simply use the salt that is generated by default. As of PHP 8.0.0, an explicitly given salt is ignored.