Re: randomize encryption ..



In addition to what J French said, your decrypt routine does not set the
value of random_stck so it will always be either zero or the last value from
the encrypt routine.
I also don't know if the VB random number generator can be sure to always
produce the same sequence (given the same seed) on every platform and under
every OS. My main concern is the hardware random number generators finding
their way into newer microprocessors which may be more supported by later
OS's.
I have used similar techniques but I use a sequence generator to produce a
set of pseudo-random numbers from a given seed - much like the random
generator but I am in control of the whole thing.

Regards
Dave O.

"angelito tan" <diamond_shoe1234@xxxxxxxxx> wrote in message
news:1178849351.765259.75670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 ...


.



Relevant Pages

  • randomize encryption ..
    ... i input my name angelito and i press the encrypt so the output would ... Dim random_stck As Integer ... Dim Cypher As String ... Private Sub cmddecrypt_Click ...
    (microsoft.public.vb.general.discussion)
  • Re: Need help decrypting
    ... Just a brief look: in your encrypt function you ... > I'm wondering if somebody can help me figure out how to decrypt data. ... > Private Sub Encryptpwd() ... > Dim ms As New MemoryStream ...
    (microsoft.public.dotnet.security)
  • Re: Need help decrypting
    ... I changed the password in Encrypt just before I posted. ... > I'm wondering if somebody can help me figure out how to decrypt data. ... > Private Sub Encryptpwd() ... > Dim ms As New MemoryStream ...
    (microsoft.public.dotnet.security)
  • Re: Extreme Porn - Hiding your Stash ?
    ... data that we want to encrypt. ... being XORed with the plaintext. ... the breaking of the German Lorenz cypher ... this was because the obscuring characters weren't as random as ...
    (uk.legal)
  • Is this Possible?
    ... I wish to encrypt an IP:PORT datum, ... would mean that encoding 0 over and over would only give 10 different ... every such cypher sent out. ... for equivalent-to-DES-64 level security (where brute-force is the only ...
    (sci.crypt)