[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: perl and md5 crypt



Brian Clark wrote:

> * john (johnpf@atnet.net.au) [Jan 13. 2002 21:10]:
>
> > Brian Clark wrote:
>
> [...]
>
> > > -------[ perl ] --------
>
> > > for(0 .. 7) {
> > >   $salt .= join '', ('.', '/', 0..9,'A'..'Z', 'a'..'z')[rand 64];
> > > }
>
> > > $password = crypt($password,'$1$' . $salt . '$');
>
> > > ------------------------
>
> > > I *think* that's how I did it once. It might actually work.
>
> > Isnt that how the man page says to do it?
>
> Which man page?
>

man 3 crypt

ERRORS
       ENOSYS The crypt function was  not  implemented,  probably
              because of U.S.A. export restrictions.

       If  the salt starts with $1$ an MD5 based password hashing <-****** Here
       algorithm is applied. The salt should consist off $1$ fol­
       lowed with eight characters.

       Programs  using this function must be linked with -lcrypt.




Reply to: