*RESOLVED* Error with Xor in VB.Net
Hi folks,
I've made a cypher class in VB.Net, but every time i run the project i get the following error. What is wrong here???
Quote:
An unhandled exception of type 'System.ArgimentException' occured in Microsoft.Visualbasic.dll
Additional information: Procedure call or argument is not valid.
On the line self (bold) i get te following description:
Quote:
This code has called into another function. When that function is finisched, this is the next statement that will be executed.
Class:
Quote:
Private Sub DoXor()
dim lngC as integer
dim intB as integer
dim lngN as integer
for lngN = 0 to mvarText.length
lngC = Asc(Mid(mvarText, lngN,1))
intB = Int(Rnd * 256)
>>>Mid(mvarText, lngN,1) = Chr(lngC Xor intB)
Next
End sub
Public Function Decrypt(byval vData as String) as String
DoXor()
Decrypt = mvarText
End Function
Can please someone help me.
Thanxxx