-
Ok, I can figure out how to encyrpt things, but how do you decrypt them? here's my code:>>>
Private Sub Command1_Click()
Dim textkey As String
Dim theletter As String
Dim theend As String
Dim randomizekey As Long
Dim temp As Integer
textkey = Text3.Text
Randomize
Rnd -1
For i = 1 To Len(Text1.Text)
For j = 1 To Len(textkey)
theletter = Chr((Asc(Mid(Text1.Text, i, 1)) Xor Int(Rnd * Asc(Mid(textkey, j, 1)))))
Next
theend = theend & theletter
Next
ency = theend
Text2.Text = ency
End Sub
Now how would I decyrpt using the same stuff...?
-
Oops
Oops, I spelled decryption wrong...
-
Hi,
Once you have the encrypted string, putting it back through the encryption process will decrypt it!!
ie:
Put a string in text1.text and encrypt it..
now put that encrypted text from text2.text into text1.text and encrypt that.. and you should now have your original string back :)
Hope this helps