Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: MD5?

by fglock (Vicar)
on Sep 17, 2002 at 19:16 UTC ( #198596=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://198596]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2021-05-07 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (81 votes). Check out past polls.

    Notices?