原帖:http://community.csdn.net/Expert/topic/3329/3329845.xml?temp=.6935236
开始就觉得要耗费不少时间,但是想到好久没作些锻炼脑力的东西了,索性来一下,呵呵
================================================================================
加密代码如下:
'加密密码开始
function encrypt(preString)
Dim texts
Dim seed
Dim i,length
prestring = trim(preString)
length = len(preString)
seed = length
Randomize(length)
texts = ""
for i = 1 to length
seed = int(94*rnd(-asc(mid(preString,i,1))-seed*asc(right(prestring,1)))+32)
texts = texts & chr(seed) & chr(int(94*rnd(-seed)+32))
next
dim dist
dist=""
for i = 1 to len(texts)
if mid(texts,i,1)<>"'" then
dist=dist+mid(texts,i,1)
end if
next
encrypt = dist
end function
'加密结束
这段程序是给用户输入的密码进行加密.此程序能否写出解密程序?应如何着手?
经过加密过后数据库显示密码的字符如下:
aaGB0x?69Pf这个密码前面有个空格,提问者没有说明,耗费些许时间================================================================================解决方法:看了两个小时,好象是可以逆出来的.不过估计要花更长时间,而且通用性不好.呵呵.主要入手点



