http://qs321.pair.com?node_id=198600


in reply to Re: MD5?
in thread How to use MD5?

do i need to define anything else, as if i just use the two lines
my $password = 'hello'; my $encrpass = md5($password);
it doesn't work? ideas?

Replies are listed 'Best First'.
Re: Re: Re: MD5?
by mdillon (Priest) on Sep 17, 2002 at 20:07 UTC
    That doesn't do what you want. Have a look at the reply from fokat below; it has the/a correct answer. Also, if your libc's crypt supports MD5 passwords natively, all you have to do is generate an appropriate salt; see this node for more info.
Re: Re: Re: MD5?
by hossman (Prior) on Sep 17, 2002 at 19:29 UTC
    that's why fglock had that line at the top of his post...

    use Digest::MD5 qw(md5 md5_hex md5_base64);