File: MD5.pm

package info (click to toggle)
libmd5-perl 2.02-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 40 kB
  • ctags: 6
  • sloc: makefile: 55; perl: 9
file content (54 lines) | stat: -rw-r--r-- 1,151 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package MD5;  # legacy stuff

use strict;
use vars qw($VERSION @ISA);

$VERSION = '2.02';  # $Date: 2001/03/14 04:44:31 $

require Digest::MD5;
@ISA=qw(Digest::MD5);

sub hash    { shift->new->add(@_)->digest;    }
sub hexhash { shift->new->add(@_)->hexdigest; }

1;
__END__

=head1 NAME

MD5 - Perl interface to the MD5 Message-Digest Algorithm

=head1 SYNOPSIS

 use MD5;

 $context = new MD5;
 $context->reset();

 $context->add(LIST);
 $context->addfile(HANDLE);

 $digest = $context->digest();
 $string = $context->hexdigest();

 $digest = MD5->hash(SCALAR);
 $string = MD5->hexhash(SCALAR);

=head1 DESCRIPTION

The C<MD5> module is B<depreciated>.  Use C<Digest::MD5> instead.

The current C<MD5> module is just a wrapper around the C<Digest::MD5>
module.  It is provided so that legacy code that rely on the old
interface still work and get the speed benefit of the new module.

In addition to the methods provided for C<Digest::MD5> objects, this
module provide the class methods MD5->hash() and MD5->hexhash() that
basically do the same as the md5() and md5_hex() functions provided by
C<Digest::MD5>.

=head1 SEE ALSO

L<Digest::MD5>

=cut