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)
'####################################### #############################

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.