|
Lines 1-24
Link Here
|
| 1 |
The MD5 module allows you to use the RSA Data Security Inc. MD5 Message |
1 |
The MD5 module allows you to use the RSA Data Security Inc. MD5 |
| 2 |
Digest algorithm from within Perl programs. |
2 |
Message Digest algorithm from within Perl programs. |
| 3 |
A new MD5 context object is created with the new operation. Multiple |
3 |
|
| 4 |
simultaneous digest contexts can be maintained, if desired. The context is |
4 |
A new MD5 context object is created with the new operation. Multiple |
| 5 |
updated with the add operation which adds the strings contained in the LIST |
5 |
simultaneous digest contexts can be maintained, if desired. The |
| 6 |
parameter. Note, however, that add('foo', 'bar'), add('foo') followed by |
6 |
context is updated with the add operation which adds the strings |
| 7 |
add('bar') and add('foobar') should all give the same result. |
7 |
contained in the LIST parameter. Note, however, that add('foo', |
| 8 |
The final message digest value is returned by the digest operation as a |
8 |
'bar'), add('foo') followed by add('bar') and add('foobar') should |
| 9 |
16-byte binary string. This operation delivers the result of add operations |
9 |
all give the same result. |
| 10 |
since the last new or reset operation. Note that the digest operation is |
10 |
|
| 11 |
effectively a destructive, read-once operation. Once it has been performed, the |
11 |
The final message digest value is returned by the digest operation |
| 12 |
context must be reset before being used to calculate another digest value. |
12 |
as a 16-byte binary string. This operation delivers the result of |
| 13 |
Several convenience functions are also provided. The addfile operation |
13 |
add operations since the last new or reset operation. Note that |
| 14 |
takes an open file-handle and reads it until end-of file in 1024 byte blocks |
14 |
the digest operation is effectively a destructive, read-once |
| 15 |
adding the contents to the context. The file-handle can either be specified by |
15 |
operation. Once it has been performed, the context must be reset |
| 16 |
name or passed as a type-glob reference. The hexdigest operation calls digest |
16 |
before being used to calculate another digest value. |
| 17 |
and returns the result as a printable string of hexdecimal digits. |
17 |
|
| 18 |
The hash operation can act as either a static member function (you |
18 |
Several convenience functions are also provided. The addfile operation |
| 19 |
invoke it on the MD5 class) or as a normal virtual function. In both cases it |
19 |
takes an open file-handle and reads it until end-of file in 1024 |
| 20 |
performs the complete MD5 cycle (reset, add, digest) on the supplied scalar |
20 |
byte blocks adding the contents to the context. The file-handle can |
| 21 |
value. This is convenient for handling small quantities of data. When invoked on |
21 |
either be specified by name or passed as a type-glob reference. The |
| 22 |
the class a temporary context is created. When invoked through an already |
22 |
hexdigest operation calls digest and returns the result as a printable |
| 23 |
created context object, this context is used. The latter form is slightly more |
23 |
string of hexdecimal digits. |
| 24 |
efficient. The hexhash operation is analogous to hexdigest. |
24 |
|
|
|
25 |
The hash operation can act as either a static member function (you |
| 26 |
invoke it on the MD5 class) or as a normal virtual function. In |
| 27 |
both cases it performs the complete MD5 cycle (reset, add, digest) |
| 28 |
on the supplied scalar value. This is convenient for handling small |
| 29 |
quantities of data. When invoked on the class a temporary context |
| 30 |
is created. When invoked through an already created context object, |
| 31 |
this context is used. The latter form is slightly more efficient. |
| 32 |
The hexhash operation is analogous to hexdigest. |
| 33 |
|
| 34 |
WWW: http://search.cpan.org/~gaas/MD5-2.03/ |