[Gambas-user] CRYPT function - a little help please?

mikeB mikeB at ...3673...
Fri Aug 25 00:14:48 CEST 2017


eGreetings,
I THINK I understand that the "Crypt" function is used to encrypt a 
password that can be checked
by challenging user input (asking to input the password). Verifies plain 
text against encrypted data -
It can NOT be decrypted.


?1 = where does this encrypted file (or string) exist after created? in 
the "shadow" file perhaps?


?2 = I am using the following lines of code for testing - I must not 
understand what I'm doing
cuz does not seem to do as expected:

userid = "xcodex"
Crypt.MD5(userid, "abcdefgh")
cked = Crypt.Check(userid, "abcdefgh")
Message.Info(cked)

cked ALWAYS returns "T" no matter how the code values are changed. Doc 
says "True" = not found?


?3 = could someone give me a couple lines of code to perform this 
function? learning by example ;-)


$4 = what's your opinion if this method is a secure way to store/ verify 
a users entry password?

Thank you very much for any help - it is GREATLY APPRECIATED!
mikeB





More information about the User mailing list