| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Simple Encryption
A lot of people ask about encryption, well I found a great tutorial that explains a great encryption method. From what I have researched this encryption is XOR256.
While this says Password Encryption, the routine can be used to encrypt just about any text from URLs to cookies! Encrypting Passwords with ASP Update: This method does have some quirks for example it can sometimes, depending on the output of an encrypted text, throw SQL query errors. To solve this simple encode them using hex or base64. I prefer using hex as it is less trouble some to decode. Here is a code sample that will show you how to do this: String to ASCII Codes/ASCII Codes to String
__________________
John Shepard Beyond The Impossible ----------------------------- Has a post helped you? Please show your apprecitation by clicking the image in the right upper corner.Posting code? Put your code between [code] and [/code] tags. X-Login and X-Send Last edited by freeasphelp : March 22nd, 2005 at 01:48 AM. |
|
#2
|
||||
|
||||
|
Ah, the good old encrypt_text function.
I abandoned this encryption function long time ago in favor of the MD5 encryption scheme used here The Encrypt_Text has dissapointed me in the past due to the selection process by which users select their passwords. Some password combinations don't fare well with this function. On the other hand, the MD5 function has not dissapointed me ever since I incorporated it into my login scripts, you can even use it in conjunction with URLs to keep spiders out of your site on secured portions of it. Anyways, just my two cents after having used this function. With some dissapointment ![]()
__________________
................... ASCII and ye shall receive .................. Knowledge is the only resource on earth that multiplies when shared Support the Shemzilla Project Powered by C# |
|
#3
|
||||
|
||||
|
nice code to know about indeed - moved this to the Code Help forum which would hold useful code samples from now on.
![]() we can also point on this thread when someone ask for encryption help. |
|
#4
|
|||
|
|||
|
Just found this thread while looking for a way to sanitise form data.
Would ASCII encoding form input prevent sql injection or can hex values also cause sql query errors? I thought that hex values could be used to inject sql or is this just via the querystring? |
|
#5
|
||||
|
||||
|
this is not relevant for sql injection attack. ascii/hex code are still only characters - the database does not care what characters you try to insert. only problem is with the single quote that must be replaced as it's the text delimeter.
|
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Simple Encryption |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|