Results 1 to 8 of 8

Thread: *RESOLVED* Error with Xor in VB.Net

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member hassa046's Avatar
    Join Date
    May 2001
    Location
    Venlo, The Netherlands
    Posts
    336

    Unhappy *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???
    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:
    This code has called into another function. When that function is finisched, this is the next statement that will be executed.
    Class:
    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
    Last edited by hassa046; May 9th, 2005 at 06:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width