Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Replace$ error
#12
Message = Replace$(Message, Chr(i), Chr((i + 2) Mod (255)))
Would be more correct.
And well, you will always get a fucked up string... You can't use the semi-encrypted string to replace, you need a backup, but actually even that will not work. You need to replace each character...
Here is the working function:
Code:
Dim checknum As Long
Dim i As Long
Randomize
checknum = Int((9 * Rnd) + 1)

txtOutput.Text = ""

For i = 1 To Len(txtInput.Text)
    txtOutput.Text = txtOutput.Text & Chr((Asc(Mid(txtInput.Text, i, 1)) + checknum) Mod 256)
Next i
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)