>Here you go. > ><Cfquery name="GetUserPasswords"> >select memberid, password from users ></cfquery> ><cfoutput>#getUserPasswords.RecordCount#</cfoutput><!---Just to see how >many we have ---> ><Cfset salt = ''/> ><cfset newpassword = ''/> ><Cfset count = 0/> ><cfloop query="GetUserPasswords"> ><cfset salt = generateSecretKey("DESEDE" )/> ><Cfset newpassword = hash( hash(password[currentrow]) & >user.salt,"SHA-256","us-ascii")/> > <cfquery name="updateUser"> >UPdate users set password = '#user.password#', salt = '#user.salt#' >where memberid = '#memberid[currentrow]#' > </cfquery> ><Cfset salt= ''/> > <cfset newpassword = ''/> ><Cfset count = count +1/> ></cfloop> > and we changed <cfoutput>#count#</cfoutput> > >Again, you will want to change one account and test it to make sure that >your login routine will validate the password and login the user. Then you >can just run this on the whole table, no muss no fuss. You won't have to >make the users change anything, their passwords will just be secure. You >will also have to come up with a Forgot Password routine, since the >passwords are irretrievable. > >Cheers, > >Rob > >
Hi Rob Did you have a problem with timeouts or out of memory errors? I have quite a bit of records ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354876 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm