Encrypt function (vb-> C#) [Resolved]
Hello
Am trying to translate a vb-encrypt function to C# but I'm stuck.
VB Code:
Dim strChar, L, x
L = Len(strKey)
For x = 1 To Len(strValue)
strChar = Asc(Mid$(strKey, (x Mod L) - L * ((x Mod L) = 0), 1))
Mid$(strValue, x, 1) = Chr$(Asc(Mid$(strValue, x, 1)) Xor strChar)
Next
I have some trouble finding the correct functions for string manipulation.
mid = .substring()
chr$ = ? (is it (char) )
ASC = ? (i think it is system.text.asciiencoding)
mod = ? (cant find it in system.math)
Xor = ? (cant find it in system.math)