Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl and md5 module

Status
Not open for further replies.

fxcolin

Technical User
Oct 14, 2001
169
0
0
CA
Hello all,

I have a friend that is trying to run a perl script
and keeps getting this error message

"Your Perl installation isn't complete enough and misses the following module perl module(s):
MD5
Most webhosting server administrators install additionial Perl modules at no charge when asked."


As far as I know md5 is some kind of security incription.
Can someone shed some light ?
What is it ? and
Do we need to have the hosting company install it ?


Thanks alot

" a pat on the back... is only
18 inches away from a kick in the arse "

 
I'm not sure, but I think the module you need is called
Digest-MD5. The latest version is 2.24 and can be obtained here
Thats unusual though, I think most standard perl packages have that module pre-installed. Maybe their server is really old, or they have a lazy sysadmin.

Good luck,
Symbiotic
 
I guess you could call MD5 a security module.

Really all MD5 does is build checksums based on a known hashing algorithm. It allows you to build a signature that you can check against latter. Instead of storing a password you can store the MD5 checksum. When you want to see if a password matches just take the plaintext passwd and check it's md5 sum against the one that is stored. MD5 checksum are one way only. In other words you can't take a md5 checksum and get the original value back by using a reverse algorithm. That is why it is used in many linux distors to store passwords.

Here is a quick example:
Code:
use Digest::MD5  qw(md5_base64);

$pass_md5 = "aNXBunxFx1Xo+faMFa0D4w";

print "Please enter your password: ";
$plain = <>;
chomp $plain;
if (md5_base64($plain) eq $pass_md5) {
  print &quot;Access granted\n&quot;;
} else {
  print &quot;Invalid Password. Go away before I thump you!\n&quot;;
}
Overall I like having Digest::MD5 available. It has many too many uses not to have it around.


 
Oh, in case you are wondering the password inth preceding example is:

This is a passwd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top