I just use CFX_HASH or Hash() to MD5 hash passwords before inserting them
into a db. For example:

Insert
------
<CFSET hash_Password = Hash(FORM.str_Password)>

<CFQUERY
  Name="qry_Insert"
  Datasource="MyDSN">
  INSERT INTO USERS (username, password)
  VALUES ('#FORM.str_Username#', '#VARIABLES.hash_Password#')
</CFQUERY>

Query
-----

<CFSET hash_Password - Hash(FORM.str_Password)>

<CFQUERY
  Name="qry_Retrieve"
  Datasource="MyDSN">
  SELECT USERID
  FROM USERS
  WHERE username = '#FORM.str_Username#' AND password = '#hash_Password#'
</CFQUERY>

Steve


-----Original Message-----
From: Jon Tillman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 1:44 PM
To: CF-Talk
Subject: Storing passwords in database as one way hash


anybody know of anything that does such?
I am looking for pretty much the same functionality as a standard *NIX login

--
***********************************************
 Jon Tillman
 LINUX USER: #141163
 ICQ: 4015362
 http://www.eruditum.org
 [EMAIL PROTECTED]
 JAPH
***********************************************
Be alert, the world needs more lerts
***********************************************

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to