Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: MD5?

by fglock (Vicar)
on Sep 17, 2002 at 19:16 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://198596]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found