Procedure and principle of ASP verification code

Source: Internet
Author: User
##### Copyright reprinted. Please keep it. Thank you for your cooperation.
##### Some programs are taken from the network
##### Author: Yangzi
##### Email: yangzinet@hotmail.com
##### QQ: 21112856
##### WebSite: www.tingfo.net
Four pages in total: form. asp; chk. asp; num. asp; count. asp
Get a number. Encryption!
The decrypted image is converted into an XBM image.
Judging by session
Form. asp
<%
'### To encrypt/decrypt include this code in your page
'### StrMyEncryptedString = EncryptString (strString)
'### StrMyDecryptedString = DeCryptString (strMyEncryptedString)
#### You are free to use this code as long as credits remain in place
'### Also if you improve this code let me know.
Private Function EncryptString (strString)
'####################################### #############################
'### Crypt Function (C) 2001 by Slavic Kozyuk grindkore@yahoo.com ###
'### Arguments: strString <--- String you wish to encrypt ###
'### Output: Encrypted HEX string ###
'####################################### #############################
Dim CharHexSet, intStringLen, strTemp, strRAW, I, intKey, effecffset
Randomize Timer
IntKey = Round (RND * 1000000) + 1000000) '##### Key Bitsize
Effecffset = Round (RND * 1000000) + 1000000) '##### KeyOffSet Bitsize
If IsNull (strString) = False Then
StrRAW = strString
IntStringLen = Len (strRAW)
For I = 0 to intStringLen-1
StrTemp = Left (strRAW, 1)
StrRAW = Right (strRAW, Len (strRAW)-1)
CharHexSet = CharHexSet & Hex (Asc (strTemp) * intKey) & Hex (intKey)
Next
EncryptString = CharHexSet & "|" & Hex (effecffset + intKey) & "|" & Hex (effecffset)
Else
EncryptString = ""
End If
End Function
Private Function DeCryptString (strCryptString)
'####################################### #############################
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.