home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,565 of 243,242   
   Chris M. Thomasson to Michael S   
   Re: srand(0)   
   24 Dec 25 00:59:16   
   
   From: chris.m.thomasson.1@gmail.com   
      
   On 12/24/2025 12:51 AM, Michael S wrote:   
   > On Tue, 23 Dec 2025 07:25:42 -0000 (UTC)   
   > Michael Sanders  wrote:   
   >   
   >> On Tue, 23 Dec 2025 00:39:49 -0000 (UTC), John McCue wrote:   
   >>   
   >>> I like to just read /dev/urandom when I need a random   
   >>> number.  Seem easier and more portable across Linux &   
   >>> the *BSDs.   
   >>>   
   >>> int s;   
   >>> read(fd, &s, sizeof(int));   
   >>   
   >> Thanks John. Wish there was such a 'device' under Windows...   
   >>   
   >   
   > There is.   
   > Windows XP/Vista/7:   
   > https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/n   
   -wincrypt-cryptgenrandom   
   > Win8 and later:   
   > https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-   
   crypt-bcryptgenrandom   
   >   
   >   
      
   CSPRNG, vs an actual TRNG?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca