On May 17, 2006, at 3:14 PM, Michael von Aichberger 2 wrote:

If you're using a technology for the first time, a couple of lines of code
may take quite a time ...

Cookbook version:

1) Download the .zip file from:
<http://anmar.eu.org/projects/jssha2/>

2) Unzip it.

3) Open the file sha256.js, and copy and paste it into a script member.

4) Be sure the script member is set to use JavaScript Syntax

5) In your password check code elsewhere, include this handler (Lingo syntax)

on checkPassword passwordAsEntered, hashedPassword
if hex_sha256(passwordAsEntered & "Salt to taste") = hashedPassword then
                return #loginOK
        else
                return #loginFailure
        end if
end checkPassword

6) Call this from your login handler, and manage the cases as needed.

7) You'll need to presave the hashed password values, but I'll leave that as a exercise to the reader.

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to