Hi all,
I am trying to write a function to pass a a encrypted password from
this vb code. If anyone can help me that would be cool.
thanks
Function EnCrypt(strCryp tThis)
on error resume next
Dim strChar, iKeyChar, iStringChar, i
g_Key = "ISSUETRK"
for i = 1 to Len(strCryptThi s)
iKeyChar = Asc(mid(g_Key,i ,1))
if err.number <0 then
Response.Write( i)
Response.End
end if
iStringChar = Asc(mid(strCryp tThis,i,1))
iCryptChar = iKeyChar Xor iStringChar
iCryptChar = Chr(iCryptChar)
iCryptChar = Asc(iCryptChar)
if CInt(iCryptChar ) < 10 then
iCryptChar = "00" & iCryptChar
elseif CInt(iCryptChar ) < 99 then 'need to pad a zero to make
it three digits
iCryptChar = "0" & iCryptChar
end if
strEncrypted = strEncrypted & iCryptChar
next
EnCrypt = strEncrypted
End Function
I am trying to write a function to pass a a encrypted password from
this vb code. If anyone can help me that would be cool.
thanks
Function EnCrypt(strCryp tThis)
on error resume next
Dim strChar, iKeyChar, iStringChar, i
g_Key = "ISSUETRK"
for i = 1 to Len(strCryptThi s)
iKeyChar = Asc(mid(g_Key,i ,1))
if err.number <0 then
Response.Write( i)
Response.End
end if
iStringChar = Asc(mid(strCryp tThis,i,1))
iCryptChar = iKeyChar Xor iStringChar
iCryptChar = Chr(iCryptChar)
iCryptChar = Asc(iCryptChar)
if CInt(iCryptChar ) < 10 then
iCryptChar = "00" & iCryptChar
elseif CInt(iCryptChar ) < 99 then 'need to pad a zero to make
it three digits
iCryptChar = "0" & iCryptChar
end if
strEncrypted = strEncrypted & iCryptChar
next
EnCrypt = strEncrypted
End Function