in reply to How to use MD5?

use Digest::MD5 qw(md5 md5_hex md5_base64); my $encrpass = md5($password); # binary or my $encrpass = md5_hex($password); # human-readable or my $encrpass = md5_base64($password); # human-readable too

Replies are listed 'Best First'.
Re: Re: MD5?
by pmme (Initiate) on Sep 17, 2002 at 19:26 UTC
    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?
      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.
      that's why fglock had that line at the top of his post...

      use Digest::MD5 qw(md5 md5_hex md5_base64);
Re^2: MD5?
by Anonymous Monk on Jan 27, 2016 at 17:09 UTC
    How can i decrypt and use the password again?