[m-rev.] for review: Add random.init/3

Paul Bone paul at bone.id.au
Thu May 26 11:18:09 AEST 2016


On Wed, May 25, 2016 at 04:28:32PM +1000, Peter Wang wrote:
> On Wed, 25 May 2016 15:55:50 +1000, Paul Bone <paul at bone.id.au> wrote:
> > For review by anyone
> > 
> > ----
> > 
> > Add random.init/3
> > 
> > random.init/3 makes it easier to seed the random number generator.  It will
> > calculate a seed based on the current time and, if known, the process ID.
> > This is sufficient for simple applications but shouldn't be used for
> > security-sensitive applications.
> 
> In my opinion, it unnecessarily conflates random with io, time and the
> operating environment.

Okay, I can make it an internal detail within io.m  I was only exposing it
since I assumed it would be useful.

> +    % NOTE: This is not suitable for security but is still suitable for some
> +    % applications.
> 
> The whole module is not suitable for security (nor much else...)

Yes, but I felt that disclaiming this was the right thing to do anyway.


-- 
Paul Bone


More information about the reviews mailing list