Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Encrypt Passwords
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mafifi
Junior Member

USA
308 Posts

Posted - 09 June 2007 :  20:31:20  Show Profile  Send mafifi an ICQ Message
I have an old membership ASP application where the passwords are in text fromat and would like to encrypt them using SHA256. I am looking for an ASP/VBS routine that can cycle thru the records and encrypt them.

Regards,

Mo

Edited by - mafifi on 09 June 2007 20:45:58

mafifi
Junior Member

USA
308 Posts

Posted - 10 June 2007 :  00:45:28  Show Profile  Send mafifi an ICQ Message
Found the answer:
<!--#INCLUDE FILE="../inc_sha256.asp"-->
<!--#INCLUDE FILE="../dataconn_inc.asp"-->
<%
' Use this routine to encrypt text passwords
strSQL = "Select ID, Passwords from Users_Table"
Set objRS = ConnPasswords.Execute(strSQL)

Do While NOT objRS.EOF
	ID = objRS("ID")
	strSQL = "Update Users_Table Set password='" & sha256("" & objRS("Password")) & "' Where ID='" & ID & "'"
	'Response.Write strSQL
	Set objTempRS = Connpasswords.Execute(strSQL)
	objRS.MoveNext
Loop

Set objTempRS = Nothing
Set ObjRS = Nothing
Set ConnPasswords = Nothing
%>

Regards,

Mo
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07