Code to validate a cookie
Good morning.
I'm using the code below to validate cookies on my website.
It works for 99.9% of situations but not all.
Does anyone have cookie authentication code they can send me?
Thank you.
Sal
===========================
Function DeCrypt(strEncrypted, strKey)
Dim strChar, iKeyChar, iStringChar
for i = 1 To Len(strEncrypted)
iKeyChar = (Asc(Mid(strKey, i, 1)))
iStringChar = Asc(Mid(strEncrypted, i, 1))
iDeCryptChar = iKeyChar Xor iStringChar
strDecrypted = strDecrypted & Chr(iDeCryptChar)
Next
DeCrypt = strDecrypted
End Function
|