Hi
Currently using the BCrypt library by donmanfred but having a little trouble with 'checkpw', possibly due to me not quite understanding the correct syntax for this lib
This is what I am using in my code:
This works fine if the passwords match, however if the password is typed incorrectly my app crashes with log:
Currently using the BCrypt library by donmanfred but having a little trouble with 'checkpw', possibly due to me not quite understanding the correct syntax for this lib
This is what I am using in my code:
B4X:
Private crypt As BCrypt
crypt.Initialize("")
If crypt.checkpw(string.Text, hash.Text)= True Then
'do something
Else
'do something else
End If
B4X:
Error occurred on line: 131 (CreatePassword)
java.lang.IllegalArgumentException: Invalid salt version
at org.mindrot.jbcrypt.BCrypt.hashpw(BCrypt.java:659)
at org.mindrot.jbcrypt.BCrypt.checkpw(BCrypt.java:764)
at de.donmanfred.BCryptwrapper.checkpw(BCryptwrapper.java:58)
at b4a.example.createpassword._checkpassword(createpassword.java:752)
at b4a.example.createpassword$ResumableSub_CheckCredentials.resume(createpassword.java:667)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at anywheresoftware.b4a.shell.Shell.runGoodChain(Shell.java:475)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:293)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)