Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: erik@pax10f.mipool.uni-jena.de (Erik Braun)
Subject: Re: Adding passwords from a script
Date: 1998/04/21	[thread overview]
Message-ID: <slrn6jojd0.3dg.erik@pax10f.mipool.uni-jena.de> (raw)
In-Reply-To: slrn6joiu0.3bt.erik@pax10f.mipool.uni-jena.de


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



      reply	other threads:[~1998-04-21  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-17  4:00 Adding passwords from a script Jeffrey Sick
1998-04-18  4:00 ` Nikola Milutinovic
1998-04-21  4:00 ` Erik Braun
1998-04-21  4:00   ` Erik Braun [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox