0 Replies - 1251 Views - Last Post: 12 October 2007 - 05:57 AM

#1 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6785
  • View blog
  • Posts: 31,309
  • Joined: 10-May 07

md5

Posted 12 October 2007 - 05:57 AM

Description: Commented inside of code.Use of md5 to create 128-bit hash value
# Use of md5 
# -#2pencil- Written for  - 10/12/2007 
############

use Digest::MD5 qw(md5 md5_hex md5_base64);

$junk=md5_hex("The quick brown fox jumps over the lazy dog");
printf("%snn",$junk);

# Note:None of these functions are exported by default. 
# This means, you can't just use the Digest::MD5 module on top of your code and then 
# call the md5 function.  This will result in an error saying md5 function not found.
# To avoid this, we loaded the module with use Digest::MD5 qw(md5 md5_hex md5_base64);

# results can be compared with [url]http://en.wikipedia.org/wiki/MD5[/url]


Is This A Good Question/Topic? 0
  • +

Page 1 of 1