On Fri, Mar 24, 2000 at 03:42:13PM -0600, daniel john wheadon wrote:
> Is there a random number generator in the Palm API? If not does anyone
> know a good alternative?

This depends on what you mean by "good".

There is a builtin call that will produce a random number, but it
isn't good for high security things like critical network passwords,
but more than enough for games.

You might get it slightly better by using that, the sync name, date
and time, number of bytes or databases, etc. through the MD5 hash
function.

If you want really random numbers, the best thing is to count clock
ticks while the user taps a key or the screen (if you can use very
fine resolution - it would need to be done at the hardware level).

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to