Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21246

Pass from vb to vbscript

$
0
0
Hello, I need to convert this VB Function to VBScript, and I did not succeed... Someone can help me to do it.
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


Viewing all articles
Browse latest Browse all 21246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>