Storing encrypted passwords in mySQL

John Tregea john at debraneys.com
Tue Nov 22 23:57:56 EST 2005


I am hoping for a suggestion or two on a "simple" way to encrypt a text
string for storage in mySql. I have built a login dialog (on a card) and
hide what the user types like this

on openfield
  global gThePass
  put empty into gThePass
  pass openfield
end openfield


on keydown thekey
  global gThePass
  put thekey after gThePass
  put "*" after field "Password"
  exit keydown
end keydown

on returninfield
  global gTheUser
  put empty into fld "password"
  send mouseup to btn "Login"
  exit returninfield
end returninfield  

That seems to work fine, but the resulting variable gThePass holds the
password in plain text. I want to store the password in mySql along with the
users name and other details.

So my question is;

Is there a way of encrypting the plain text string in Rev, (before sending
to mySQL) so I can store it in a mySQL table. I don't want the password to
be human readable by logging into mySQL and doing a SELECT statement
directly.

Thanks for any advice

John T




More information about the use-livecode mailing list