Tutorial Navigation
 

     
 Links
 

 
.

 

 Search         Date   
      

ASP
:  Password Encryption, 
July 11, 2004  -  by Oper  
Some host dont offer any type of encrypt object, this is one simple test encryption
for login/password form. Function wil return the password encripted.


<%
FUNCTION EncryptPassword(User,Password)
Dim CRC1,CRC2,YourNUMBER,X

'Change this number For Hard Reverse and Personal Encryption  (use Number beetween 2 and 999 to avoid Overflow on ASP)
YourNumber=123           

CRC1=0
CRC2=0
for x=1 to len(User)
    CRC1=CRC1 +  ( asc(mid(user,x,1)) * (X+2) )
Next
for x=1 to len(Password)
    CRC2=CRC2 +  ( asc(mid(Password,x,1)) * (x+3) )
Next
                                                               
EncriptPassword=ucase(user & "-" & ( CRC1 + CRC2 + YourNumber ) & hex ( CRC2 + CRC1 * YourNumber))
End Function
%>


Sample:
dim Penc
Penc= EncryptPassword("Oper","ABCD1234")
response.write(Penc)

Note: The Password cant be reverted, but this Encryption is not a NASA type encryption.
just a simple encryption.

   

.

     
 Featured Links