27-02-2009, 12:50 AM
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:
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