B4J Question (SOLVED) Hide password 2

besoft

Active Member
Licensed User
Longtime User
I'm still exploring how to do the Login system in the desktop UI application.

I found this:

https://www.b4x.com/android/forum/threads/password-sha512-hash-and-salt.75011/

I have problems with the Salt function. I get the following error:

B4X:
B4J Version: 6.01
Parsing code.    (0.00s)
Compiling code.    (0.02s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.01s)
Compiling generated Java code.    Error
B4J line: 16
Log(RandomSalt)
javac 1.8.0_101
src\b4j\example\main.java:61: error: no suitable method found for NumberToString(byte[])
anywheresoftware.b4a.keywords.Common.Log(BA.NumberToString(_randomsalt()));
                                           ^
    method BA.NumberToString(double) is not applicable
      (argument mismatch; byte[] cannot be converted to double)
    method BA.NumberToString(float) is not applicable
      (argument mismatch; byte[] cannot be converted to float)
    method BA.NumberToString(int) is not applicable
      (argument mismatch; byte[] cannot be converted to int)
    method BA.NumberToString(long) is not applicable
      (argument mismatch; byte[] cannot be converted to long)
    method BA.NumberToString(Number) is not applicable
      (argument mismatch; byte[] cannot be converted to Number)
1 error

I want to create an application in which the user logs in with a user name and password. It requires that the password is in no way possible to be identified or stored as readable text anywhere. As far as I understand, Password SHA512 hash and salt is a good solution for my application.

Does anyone know any other solution, idea?
 
Top