You could use the hash() function. Example: below taken from the docs

<!--- How to use Hash for password validation. This assumes that UserID
value is passed to this page with a URL parameter. --->
<h3>Hash Example</h3>

<cfquery name = "CheckPerson" datasource = "UserData">
   SELECT PasswordHash
   FROM SecureData
   WHERE UserID = <cfqueryparam value = "#UserID#"
      cfsqltype = "CF_SQL_CHARVAR">
</cfquery>

<cfif Hash(form.password) is not checkperson.passwordHash>
  <cflocation url = "unauthenticated.cfm">
<cfelse>
   ...
</cfif>

============================================
Bryan F. Hogan
Director of Internet Development
Team Macromedia Volunteer
Macromedia Certified ColdFusion MX Developer
Digital Bay Media, Inc.
1-877-72DIGITAL
============================================

-----Original Message-----
From: Anthony Wong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:45 AM
To: CF-Talk
Subject: encrypting password


What would be the best method to encrypt password before it is inserted into
the database? I'm using MySQL database. Would cfencrypt and cfdecrypt
function sufficient in this case?

TIA

Anthony


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89
70.4
                                

Reply via email to