| 发表于:2007-04-24 11:57:451楼 得分:20 |
'加密 private function encryptcode(byval ssourcecode as string, byval iposition as integer) dim i as integer dim char as string dim stargetcode as string for i = 1 to len(ssourcecode) char = mid(ssourcecode, i, 1) stargetcode = stargetcode & chr(asc(char) + iposition) next i encryptcode = stargetcode end function '解密 private function revertcode(byval stargetcode as string, byval iposition as integer) dim i as integer dim char as string dim ssourcecode as string for i = 1 to len(stargetcode) char = mid(stargetcode, i, 1) ssourcecode = ssourcecode & chr(asc(char) - iposition) next i revertcode = ssourcecode end function | | |
|