Sujet : Re: lun - Lucky Number
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : sci.cryptDate : 08. Mar 2025, 22:42:44
Autres entêtes
Organisation : Fix this later
Message-ID : <vqidkl$aqnb$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 08/03/2025 21:32, Rich wrote:
<snip>
Looking at the source, how does someone with pencil and paper perform
this magic?:
n, _ := rand.Int(rand.Reader, max)
Roll some dice.
d4 give you two bits at a time, d8 give you three, or d16 give you four. Quick and easy. Or if you prefer decimal, d10s are also readily available.
As well, with just pencil and paper, obtaining a Unix epoch is quite an
interesting 'by hand' calculation in order to perform this:
epochTime := time.Now().Unix()
You can skip that part by pretending it's 1970.
-- Richard HeathfieldEmail: rjh at cpax dot org dot uk"Usenet is a strange place" - dmr 29 July 1999Sig line 4 vacant - apply within