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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Encrypted Password
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Brachole
Starting Member

USA
33 Posts

Posted - 18 April 2005 :  15:35:49  Show Profile  Visit Brachole's Homepage
I have the forum in my website, but I actually have a different page that let's users register, which is not part of the Forum.

The password amd username is actually inserted into the "FORUM_MEMBERS" under "M_PASSWORD" & "M_USERNAME".

However, if you register through "register.asp" from the forum, the password inserted is encrypted.

How do I encrypt the password from my Registration Page?

Right now, whatever password the user picks, you can see it in the DB.

And when trying to log on using the password, it gives me invalid username and passowrd.

thanks.

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 April 2005 :  16:34:08  Show Profile  Send ruirib a Yahoo! Message
You need to use the sha256 function in inc_sha256.asp.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Brachole
Starting Member

USA
33 Posts

Posted - 19 April 2005 :  10:07:36  Show Profile  Visit Brachole's Homepage
How would I include the function into my own asp registration page?

Also, do I need to change the names of my text fields and form name?

Thanks.
Go to Top of Page

Roger Fredriksson
Average Member

Sweden
556 Posts

Posted - 19 April 2005 :  12:15:07  Show Profile  Visit Roger Fredriksson's Homepage
I did it this way for a new visitor on my own registration page: (make sure that strConnStrin is correct for your db)

<!--#INCLUDE FILE="inc_sha256.asp"-->
<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->

<%
Dim objRS, intIDForNewRecord
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "Forum_Members", strConnString , adOpenStatic, adLockOptimistic, adCmdTable

objRS.MoveLast
objRS.AddNew ' add a new record

....
strEncodedPassword = sha256("" & trim(objRS("M_NAME")))
objRS("M_Password") = strEncodedPassword
objRS.Update
....
objRS.Close
Set objRS = Nothing
....
%>

rf/www.avgifter.com
Go to Top of Page

Brachole
Starting Member

USA
33 Posts

Posted - 20 April 2005 :  10:37:03  Show Profile  Visit Brachole's Homepage
I know this sounds silly, but is there a way to disable the encrypted password in the database?

The reason I'm asking is because I'm using my own html form to insert the username and password inot the Snitz DB.

However, it looks like it reads the actual password chosen by my user as encrypted when trying to log on to the forum.

Example, in my own html form, if the user choose the password "1234", it is then inserted as is into the DB.

But when the user tries to log on, it doesn't work...

If the only way is to import the sha function into my own registration page...I'm using ASP with Javascript, so the tip from Roger Fredriksson won't work...

thanks a bunch!

thanks.
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 20 April 2005 :  11:18:38  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
<!--#INCLUDE FILE="inc_sha256.asp"-->
will include the function on your asp page.

strEncodedPassword = sha256("" & trim(Request.form("password")))
will encode the password.

Then insert strEncodedPassword into the password field instead of the unencrypted one.


Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Brachole
Starting Member

USA
33 Posts

Posted - 20 April 2005 :  11:52:43  Show Profile  Visit Brachole's Homepage
hummm...could it be that the function is in VB Script and that my own page is in Javascript, whic doesn't work?

Maybe I should just create my own page in VBScript...what do you think?
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 20 April 2005 :  14:03:59  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I haven't tested this but you can have two languages on the same asp page.
inc_func_common.asp does it.

You can still include the sha function but you have to specify the language at the top of inc_sha256.asp e.g.

<script language="vbscript" runat="server">
......inc_sha256.asp snipped code........
</script>

and put this at the top of your own asp page.

<script language="javascript1.2" runat="server">

.........then your javascript code...........

</script>


Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - Podge on 20 April 2005 14:04:27
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07