|
From: <rob@dekko.com> > 1) What is z.digit(6)? I saw nothing for a parameter. just the poor man's way of denoting the 6th digit of z > Or was > compute z = x * x > supposed to be > compute z = x * y no take the square > > compute x = 12345 + hh * 3600 + ss * 60 + mm > is the same as > x = 12345 + (hh * 3600) + (ss * 60) + mm > lowest possible value would then be > 01:01:01 > x = 12345 + (01 * 3600) + (01 * 60) + 01 > or 16006 > then 16006 * 16006 = 256,192,036 > highest possible value would then be > 23:59:59 > x = 12345 + (23 * 3600) + (59 * 60) + 59 > or 98744 > then 98744 * 98744 = 9,750,377,536 > > Basically though, time of day is not really generally accepted practice. > Frankly not enough randomness, and it tends to be stacked at time of most > use. > yes but taking the middle digits of the square is a pretty good randomizer and for the purposes of selecting a random (I assume 4-digit) PIN, this is good enough. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.