delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/25/12:30:51

From: Fabrice ILPONSE <fabrice AT asim DOT lip6 DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Random numbers aren't random - ???
Date: Fri, 25 Sep 1998 18:23:27 +0200
Organization: Universites Paris VI/Paris VII - France
Lines: 22
Message-ID: <360BC37F.D5913C6B@asim.lip6.fr>
References: <360bc15f DOT 0 AT news DOT zeitung-online DOT net>
NNTP-Posting-Host: asim.lip6.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Florian Janoschek wrote:
> 
> Hello,
> 
> I'm just writing a little encryption program which sould be able to create
> its own random passwords. The code is something like that:
> 
> srandom(biostime(0, 0)); // DOS-ticks are used as seed value
> unsigned char C = (rand() %  255) + 1; // no null-characters

	i think srandom is to be use with random.
	for rand() use srand


-- 
	^ ^ ^
	| | |
	+-+-+	Fabrice ILPONSE
	  |	email: fabrice AT asim DOT lip6 DOT fr
	  |
	  |
	  -

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019