Phobos randomUUID is not suitable to generate secrets

Andy Balba pwplus7 at
Sat Sep 5 19:27:54 UTC 2020

On Monday, 31 August 2020 at 16:10:33 UTC, Steven Schveighoffer 
> On 8/31/20 9:17 AM, WebFreak001 wrote:
>> On Monday, 31 August 2020 at 07:49:24 UTC, Cym13 wrote:
>>> Hi there,
>>> As always when I make an appearance it's that something has 
>>> gone wrong. Either in a popular library or D itself... This 
>>> time it's a little bit of both.
>>> [...]
>> Thanks for the post! Read the crypto review before and surely 
>> enough this time again it was really fun to read through the 
>> whole post. I also love the random pictures in your posts :p
> I share this sentiment, great article!
>> I'm not too sure if I ever use randomUUID now, but if it was 
>> used in vibe.d applications by default that's terrifying to me.
> I had to look it up to make sure. The session id producer uses 
> what is recommended in the article:
> whew!
> -Steve

I'm trying to create a crypto random number generator based on 
extracting only what is essential from the above code, and the 
only thing blocking this effort are two compile errors : both 
related to 'undefines' for 'IOMode' and @blocking

gdc -o aexe rand_crypto.d
rand_crypto.d:62:12: error: undefined identifier ‘IOMode’
      size_t read(scope ubyte[] dst, IOMode mode) @blocking;
rand_crypto.d:77:21: error: undefined identifier ‘IOMode’
      override size_t read(scope ubyte[] dst, IOMode mode) @safe;
rand_crypto.d:29:29: error: undefined identifier ‘blocking’
      @property bool empty() @blocking;

After numerous searches, I'm unable to get a definition of vibe 
.. and haven't a clue on @blocking is about... Any help is 
greatly appreciated.

More information about the Digitalmars-d mailing list