Hello, I need to convert this VB Function to VBScript, and I did not succeed... Someone can help me to do it.
Thanks.
Thanks.
Code:
Function XorEncrypt(ByVal sData As String) As String
Dim l As Long, i As Long, byIn() As Byte, SOut() As String, byKey() As Byte
byIn = StrConv(sData, vbFromUnicode)
ReDim SOut(LBound(byIn) To UBound(byIn))
byKey = "key"
l = LBound(byKey)
For i = LBound(byIn) To UBound(byIn) Step 1
SOut(i) = byIn(i) Xor byKey(l)
l = l + 1
If l > UBound(byKey) Then l = LBound(byKey)
Next i
XorEncrypt = Join(SOut, ",")
End Function