?
Solved

How to use md5 perl hashing algo

Posted on 2003-02-25
3
Medium Priority
?
289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 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 26

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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

752 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