randomize encryption ..
- From: angelito tan <diamond_shoe1234@xxxxxxxxx>
- Date: 10 May 2007 19:09:11 -0700
this is tough,, and i guess i'm in the right site, i wonder is there
somebdy here can help me about randomize encryption, like for example
i input my name angelito and i press the encrypt so the output would
be a chr(ascii) , and when i re-input my name angelito and encrypt it
the output of chr(ascii) would NOT be the same in the first
chr(ascii) , so everytime i input the name angelito and encrypt it
different chr(ascii) would appear, my problem is how about when i
unload the form or close the program and i have this character >>
"#ÞÑÎÝØïæ" << this one was encrypted .. And when i run the program and
put it on the decrypt box the decrypted output was not the string
angelito .. how about dat??
-- here's my work ...
Option Explicit
Dim random_stck As Integer
Dim i As Integer
Dim Cryptology As Integer
Dim Cypher As String
Dim cd As Integer
Dim crypt1 As Integer
Private Sub cmddecrypt_Click()
D_CRYPT (Text1.Text)
End Sub
Private Sub cmdencrypt_Click()
E_CRYPT (Text1.Text)
End Sub
Private Sub E_CRYPT(Text As String)
random_stck = Int(Rnd * Len(Text))
Cryptology = Asc(Mid(Text, 1, 1)) + random_stck
For i = 1 To Len(Text)
Cryptology = Asc(Mid(Text, i, 1)) + random_stck
Cypher = Cypher & Chr(Cryptology And 255)
Next
Text1.Text = Cypher
Cypher = vbNullString
End Sub
Private Sub D_CRYPT(Text As String)
For i = 1 To Len(Text)
Cryptology = Asc(Mid(Text, i, 1)) - random_stck
Cypher = Cypher & Chr(Cryptology And 255)
Next
Text2.Text = Cypher
Cypher = vbNullString
End Sub
Private Sub Form_Load()
Randomize
End Sub
it's only on the form i didn't put it on any modules ...
.
- Follow-Ups:
- Re: randomize encryption ..
- From: Tony Proctor
- Re: randomize encryption ..
- From: Dave O.
- Re: randomize encryption ..
- From: J French
- Re: randomize encryption ..
- Prev by Date: Re: SQL Update question
- Next by Date: Re: Exiting from a Do Loop
- Previous by thread: Re: Buffer Size Limit - Rule Of Thumb
- Next by thread: Re: randomize encryption ..
- Index(es):
Relevant Pages
|