VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



My method to create true random numbers for encryption software.

by David M. Lewis - Shock Troop (1 Submission)
Category: Encryption
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 22nd August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

My method to create true random numbers for encryption software.

API Declarations


'this function gets the color number under the mouse pointer.

Rate My method to create true random numbers for encryption software.



'It accomplishes this by constantly placing points of random color on the form.
'As the mouse is moved over the form the color is picked up and used as the
'random number.  At the same time the mouse movement is changing the colors
'on the form.  This is a systme that I have designed for an new encryption
'concept called LEWCYPHER.  It's a new concept that has no constant
'algorithms, keys, and unlimited potential.   Nothing, even algorithms are ever
'stored in the software.  Reverse engineering is impossible!

'Hopefully if the NSA allows me to release it to the public, you will see this 
'encryption on the market very soon.

'This source code is public domain.
'-David Lewis   [email protected]

'Load a form.  Place a label in one of the corners with a fixed bordertype.
'paste this code in and hit F5!

Public rngready

Private Sub Form_Load()
MsgBox "Starting Number Generator, keep moving the mouse on the window."
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y _ As Single)
For tmp = 1 To 1000   '(If your system is slow, lower this)
Randomize Timer + X + Y 
'Uses the mouse pointer as part of the seed to fill the form with colors.
X = Int(Rnd * Form1.Width)
Y = Int(Rnd * Form1.Height)
r = Int(Rnd * 255)
g = Int(Rnd * 255)
b = Int(Rnd * 255)
Form1.PSet (X, Y), RGB(r, g, b)
Next tmp

Label1.Caption = GetPixel(Form1.hdc, Form1.ScaleX(X, Form1.ScaleMode, 3), _ Form1.ScaleY(Y, Form1.ScaleMode, 3))
Label1.Refresh
End Sub

Private Sub Timer1_Timer()
rngready = 1
'Here you could use a public variable and turn it on after a 
'specific interval to ensure that the form is filled with random colors.
'When the variable is on, then start storing numbers!
End Sub


Download this snippet    Add to My Saved Code

My method to create true random numbers for encryption software. Comments

No comments have been posted about My method to create true random numbers for encryption software.. Why not be the first to post a comment about My method to create true random numbers for encryption software..

Post your comment

Subject:
Message:
0/1000 characters