MessageDigest.pl

By A^1^T^E^A^M on May 13, 2008

Simple using the modules of MD5 (125 b) and SHA1 (160 b) algoritms...

#!/usr/bin/perl -w
use Digest::MD5 qw(md5_hex);
use Digest:SHA1 qw(sha1_hex);

if (@ARGV !=1)
{
print "Usage: perl $0 <word to encrypt>\n";
exit;
}
($var) = @ARGV;
print "\n$var (MD5)" . " : " . md5_hex("$var")."\n";
print "$var (SHA1)" . " : " . sha1_hex("$var")."\n";

#hawkee.com

Comments

Sign in to comment.
DiGiTaL   -  Sep 13, 2008

if (@ARGV !=1)

@ARGV is a list, it will not work because you are comparing the array to an integer. The correct term you'd need is $#ARGV.

If ($#ARGV != 1) { do stuff }

($var) = @ARGV; you are distributing @ARGV into ($var), var is now a list therefore you cant use it this way: print "\n$var (MD5)" . " : " . md5_hex("$var")."\n"; you'd need to access the elements for example $var[0]

 Respond  
A^1^T^E^A^M   -  May 14, 2008

Simple using the modules of MD5 (125 b) and SHA1 (160 b) algoritms...


Encryption of MD5 and SHA1, but its using more for integrity for files, for any text ...

 Respond  
Jonesy44   -  May 14, 2008

mIRC is a doss. lol.
I just don\'t understand the perl syntax much, a little more explination would be nice :-)

 Respond  
Eugenio   -  May 13, 2008

LOL I have the same question as Jonesy
mIRC coding is bad enough this perl stuff is out of this world.

 Respond  
Jonesy44   -  May 13, 2008

What does this do exactly? :-s

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.