Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to use md5 perl hashing algo

Posted on 2003-02-25
3
Medium Priority
?
295 Views
Last Modified: 2010-03-05
I am trying to encrypt a password uing MD5 perl hash algorithm but while doing so im getting the error: "can't locate loadable object for module Digest::MD5 in @INC.

How do i install the missing file, please tell me the steps to follow,i really need this.

use MD5;
$Password="chitra";
$md5 = new MD5;
$hash = MD5->hexhash(MD5->hexhash ($Password));
print "$hash\n";
-----------------------------------------------------
I try using this code but it need MD5.pm how do i install this file
use Digest::MD5  qw(md5 md5_hex md5_base64);
$Pass="chitra";
$digest = md5($Pass);
print "$digest\n";
0
Comment
Question by:trishtee
2 Comments
 
LVL 5

Accepted Solution

by:
PC_User321 earned 92 total points
ID: 8015601
Type "ppm" at the command promp, then "search digest".
After a few seconds you will probably see "Digest-Perl-MD5     [1.5 ] Perl Implementation of Rivest's MD5 algorithm".  Since that is what you want, type "install Digest-Perl-MD5"
0
 
LVL 27

Assisted Solution

by:wilcoxon
wilcoxon earned 88 total points
ID: 8018468
Or, if you are not on Windows, you need to do:

perl -MCPAN -e shell
install Digest::MD5

Or you could just do:

perl -MCPAN -e 'install "Digest::MD5"'

If you opt for the '-e shell' option, then you can enter h to get help on CPAN commands and experiment.

Depending on if you are on Windows running ActiveState (ppm) or on something else (-MCPAN), you should get familiar with the appropriate tool as CPAN is a great resource for modules to do tons of different things.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question