请帮忙解决这段加密代码,如何写出解密代码
func encrypt()para ss1
IF len(ss1)>0
handle1=fopen(ss1,2)
if handle1< 0
messagebox('没有找到指定文件...',0+64,'系统提示')
return
ENDIF
ENDIF
i=1
nn1=len(ss1)
ss2=subs(ss1,1,nn1-4)+'.dat' &&构造加密后文件扩展名为.dat
handle2=fcreate(ss2)
do while i<nn1
=fseek(handle1,i)
retasc=fread(handle1,i)
if asc(retasc)=13
exit
endif
i=i+1
enddo
=fseek(handle1,0)
retstr=fread(handle1,i)
=fwrite(handle2,retstr)
j=0
DO while .not.feof(handle1)
=fseek(handle1,i+j)
if asc(retasc)>253
ch=chr(255-asc(retasc))
else
ch=chr(asc(retasc)+2)
endif
=fwrite(handle2,ch)
j=j+1
enddo
messagebox('加密成功...',0+64,'系统提示')
=fclose(handle1)
=fclose(handle2)
dele file &ss1
return ss2
ENDFUNC
&&输出加密文件名,文件扩展名改为.DAT
[此贴子已经被作者于2018-5-20 21:15编辑过]