On Sun, Feb 07, 2010 at 08:24:49PM +0100, Otto Moerbeek wrote:
> On Sun, Feb 07, 2010 at 01:59:33PM -0500, Brad Tilley wrote:
> 
> > I wrote a small cpp application to generate randomish passwords. It 
> > compiles and runs OK on OpenBSD, however, it does not seem to create random 
> > strings (the first and last chars seldom ever change, etc). The same code 
> > compiles and runs on Linux and Windows and *does* produce randomish strings 
> > (no often repeating chars). The source code is small and is contained in a 
> > single file. I placed it here along with binaries for OpenBSD and Windows:
> > 
> > http://16systems.com/downloads
> > 
> > I could be doing something wrong. I've checked the source code several 
> > times but nothing obvious stands out. I'll try a gcc compiler from ports 
> > tomorrow to see if that makes a difference. Until then, I thought I'd post 
> > to tech. Can anyone tell if I've made an error in the source code?
> 
> rand(2) EXACTLY performs as is should. Look at the NAME section in the
> man page. 
> 
> Everyone considering rand() for password generation is in a state of sin.

Using c++!

Not sure Brad can have salvation at this point.

> 
>       -Otto

Reply via email to