dim pwd pwd=inputbox("請輸入新密碼:","更改密碼","yulv.net") if pwd<>"" then pwd=PwdConv(pwd) inputbox "您的新密碼編碼是:" & vbcrlf & "請將新的編碼替換到程序中的密碼項!","密碼編碼",pwd else msgbox "您沒有輸入新密碼,系統(tǒng)無法幫您轉(zhuǎn)換!" end if function PwdConv(byval spwd) dim i,ref,value,ltmp ltmp=0 for i = 1 to lenb(spwd) value=ascb(midb(spwd,i,1)) value=(value*i) + 255 if (ltmp+value)>(&HFF*lenb(spwd)) then ref=ref & hex(ltmp) ltmp=0 end if ltmp=ltmp + value + Len(Cstr(lTmp)) next if ltmp>0 then ref=ref & hex(ltmp) If Mid(ref,1,1)="0" Then ref=Hex(Len(ref)) & ref PwdConv= ref end function