I have written a program to generate Pseudo Random Data, but I am
facing certain problems with the speed of the generation.
The problem I am facing is that if a user enters a number, ex: 1,2
etc., the program generates a pseudo random file of 1,2...MB.
I am using this way:
----------------------
While (Filelen <> 1)
...
...
...
Wend
----------------------
The problem with this loop is that as this loop starts, all other
system activities suffer. Since my program is supposed to run
minimized and in background, I then used API calls to set the priority
of the current thread to minimum. But still until the loop ends,
all the other system activities hang.
What to do?
Secondly, I am using Hash Algorithm to get the message digest of
the pseudo random numbers. This hash value is written in a file.
But still the process is slow. It writes 1 MB file in about 15-20
minutes. The problem is not with the Hash Algorithm, but with VB.
The C implementations are very fast.
How can I make it fast?
---------------------------------
Securing a computer system has traditionally been a battle of wits: the penetrator tries to find the holes, and the designer tries to close them. � M.Gosser
facing certain problems with the speed of the generation.
The problem I am facing is that if a user enters a number, ex: 1,2
etc., the program generates a pseudo random file of 1,2...MB.
I am using this way:
----------------------
While (Filelen <> 1)
...
...
...
Wend
----------------------
The problem with this loop is that as this loop starts, all other
system activities suffer. Since my program is supposed to run
minimized and in background, I then used API calls to set the priority
of the current thread to minimum. But still until the loop ends,
all the other system activities hang.
What to do?
Secondly, I am using Hash Algorithm to get the message digest of
the pseudo random numbers. This hash value is written in a file.
But still the process is slow. It writes 1 MB file in about 15-20
minutes. The problem is not with the Hash Algorithm, but with VB.
The C implementations are very fast.
How can I make it fast?
---------------------------------
Securing a computer system has traditionally been a battle of wits: the penetrator tries to find the holes, and the designer tries to close them. � M.Gosser