how to write a function to call this VB script
From: Pat <patm_at_worktechnology.com>
Date: 9 Dec 2003 10:55:07 -0800
Message-ID: <2cacd6c6.0312091055.7110f69d_at_posting.google.com>
EnCrypt = strEncrypted
End Function Received on Tue Dec 09 2003 - 19:55:07 CET
Date: 9 Dec 2003 10:55:07 -0800
Message-ID: <2cacd6c6.0312091055.7110f69d_at_posting.google.com>
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(strCryptThis)
on error resume next
Dim strChar, iKeyChar, iStringChar, i
g_Key = "ISSUETRK"
for i = 1 to Len(strCryptThis)
iKeyChar = Asc(mid(g_Key,i,1))
if err.number <> 0 then
Response.Write(i)
Response.End
end if
iStringChar = Asc(mid(strCryptThis,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 Received on Tue Dec 09 2003 - 19:55:07 CET
