Print Page | Close Window

Encrypt text

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=6117
Printed Date: 31 March 2026 at 1:22pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Encrypt text
Posted By: twooly
Subject: Encrypt text
Date Posted: 02 October 2003 at 12:12pm

I was just wandering if anyone knew how to encrypt text into a database.  Basicly what I am doing is writting my own login page would like to encrypt the password field so it isn't in plain text.

 

Thanks

--Todd




Replies:
Posted By: pmormr
Date Posted: 02 October 2003 at 6:41pm
see http://local.15seconds.com/issue/000217.htm - http://local.15seconds.com/issue/000217.htm

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: fernan82
Date Posted: 02 October 2003 at 6:49pm

Or if you don't want to use components use the has1way function that comes with the WWForums, you can use it and distribute it as long as the header is not modified.....

With that function you just do something like this to encrypt the password:

Password = Trim(Password)
Salt = getSalt(Len(Password))
Password = HashEncode(Password & Salt)

That simple...



Posted By: Bluefrog
Date Posted: 02 October 2003 at 7:43pm
I've pretty much settled on how I'm going to settle security from now on for my own site security. Self issued SSL certificates. Problem there is that you have to make your server an CA, which means that you had better decide on how to configure it before, because you lose some flexibility once you do install the CA functionality on it.

-------------
http://renegademinds.com/" rel="nofollow - Renegade Minds - Guitar Software http://renegademinds.com/Default.aspx?tabid=65" rel="nofollow - Slow Down Music


Posted By: dpyers
Date Posted: 03 October 2003 at 1:33am
When you issue your own cert, it shows up as not being from a trusted authority which scares some people. You may want to place a site entry page outside of the area covered by the cert that explains the trusted authority bit.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: pmormr
Date Posted: 03 October 2003 at 11:00am
that was a link for the information on the hash encoding used in web wiz forums...

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: fernan82
Date Posted: 03 October 2003 at 9:36pm

Originally posted by pmormr pmormr wrote:

that was a link for the information on the hash encoding used in web wiz forums...

The function on WWF has a link to that page but it just says For more information on Password HASH Encoding, and SALT visit: http://local.15seconds.com/issue/000217.htm - http://local.15seconds.com/issue/000217.htm  not that it's the same...

The encryption used in WWF uses a pure-ASP function to encrypt the passwords, that link just explains how HASH Encoding works and provide sample codes on how to use it using the Persits AspEncrypt component....

I don't know where Bruce got that function from as there's no link but I've taken it from WWF and used it on my own work a few times as the file comments say "Free to distribute as long as code is not modified, and header is kept intact"



-------------
FeRnAN
http://www.danasoft.com/">


Posted By: pmormr
Date Posted: 04 October 2003 at 8:52am
Originally posted by The header at the top of functions/functions_hash1way.asp The header at the top of functions/functions_hash1way.asp wrote:

' Function takes a given length x and generates a random hex value of x digits.
' Salt can be used to help protect passwords.  When a password is first stored in a
' database generate a salt value also.  Concatenate the salt value with the password,
' and then encrypt it using the HashEncode function below.  Store both the salt value,
' and the encrypted value in the database.  When a password needs to be verified, take
' the password concatenate the salt from the database.  Encode it using the HashEncode
' function below.  If the result matches the the encrypted password stored in the
' database, then it is a match.  If not then the password is invalid.
'
'
' Note: Passwords become case sensitive when using this encryption.
' For more information on Password HASH Encoding, and SALT visit: http://local.15seconds.com/issue/000217.htm - Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: fernan82
Date Posted: 04 October 2003 at 8:43pm

Did you read my last post?

As I said there, yes, there is a link to that page on that file, but it's NOT the same thing, the file says:

FOR MORE INFORMATION ABOUT HASH ENCODING AND SALT VISIT: http://local.15seconds.com/issue/000217.htm - http://local.15seconds.com/issue/000217.htm

It doesn't say that it's the same thing. The FACT is that the examples on that page are for encryption using the Persits AspEncrypt component. And all I said in my post is that if he don't want to use component then use the function that comes with WWF.

Originally posted by pmormr pmormr wrote:

that was a link for the information on the hash encoding used in web wiz forums...

Simply not true. That link is for information about hash encoding and salt, NOT for the information on the hash encoding used in web wiz forums. period.

 



-------------
FeRnAN
http://www.danasoft.com/">


Posted By: Mart
Date Posted: 05 October 2003 at 5:32am

Download webwizforums and have a look in the functions folder, copy that to the folder your script. Then use this

<!--#include file="functions_hash1way.asp"-->

<%

Response.Write(hashencode("text"))

%>

That shold show you how to use it...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net