From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,5d14ca6c35ee5b90 X-Google-Attributes: gidfee84,public From: erik@pax10f.mipool.uni-jena.de (Erik Braun) Subject: Re: Adding passwords from a script Date: 1998/04/21 Message-ID: #1/1 X-Deja-AN: 346230608 References: <353b7a65.81524045@news3.buffnet.net> Organization: Friedrich-Schiller-University Jena, Germany Newsgroups: comp.unix.osf.osf1 I forgot one line, sorry: ># $pwd must be the uncrypted password > $salt=&saltchar+&saltchar; >$cryptpwd=crypt($pwd,$salt); > >sub saltchar { > $rc=rand(62); > if ($rc<25) { $rc+=65; } # 0-24 goes A-Z > elsif ($rc<50) { $rc+=72; } # 25-49 goes a-z > else { $rc-=4; } # 50-61 goes ./0-9 > $rc; >} -- erik@minet.uni-jena.de