[RESOLVED] Coding codes and decoding
I am making an encryption program with vb6 How would I turn each letter of a message into an ASCII equivalent?
The codes I have tried just turn one letter into ASCII.
Once this has been done, the program will multiply all of the ASCII numbers by a user specified amount.
If the message is recived, and the other user knew what to divide the number by, how would I break the code up back into a message?
Re: Coding codes and decoding
Re: Coding codes and decoding
I cant figure out how to make it encode the text or decode it
Re: Coding codes and decoding
Quote:
Originally Posted by ajames
I cant figure out how to make it encode the text or decode it
It's easy.
You just pass the text you want to encrypt to Encrypt function with some key.
When you want to get teh original text back again, just pass the Encrypted text to Decrypt function with the same key with which it was encrypted.
e.g.
VB Code:
Private Sub Command1_Click()
Dim EncryptedText$, DecryptedText$
EncryptedText = Encrypt("Hello this is a test", "ajames")
MsgBox EncryptedText
DecryptedText = Decrypt(EncryptedText, "ajames")
MsgBox DecryptedText
End Sub
Pradeep
Re: Coding codes and decoding