dim pwd
pwd=inputbox("Please enter a new password:","Change password",")
if pwd<>"" then
pwd=PwdConv(pwd)
inputbox "Your new password encoding is:" & vbcrlf & "Please replace the new encoding with the password item in the program!","Password encoding",pwd
else
msgbox "You did not enter a new password, and the system cannot help you convert it!"
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