SPVM::Digest::MD5 - MD5
The Digest::MD5 class of SPVM has methods for MD5.
use Digest::MD5; my $digest = Digest::MD5->md5($data); my $digest_hex = Digest::MD5->md5_hex($data);
Object-Oriented Programming:
my $md5 = Digest::MD5->new; $md5->add($data1); $md5->add($data2); my $digest = $md5->digest; my $digest_hex = $md5->hexdigest;
static method md5 : string ($data : string);
Calculates the MD5 digest of the $data, and returns it in binary form. The returned string will be 16 bytes long.
Exceptions:
$data must be defined. Otherwise an exception is thrown.
static method md5_hex : string ($data : string);
Same as "md5", but will return the digest in hexadecimal form. The length of the returned string will be 32 and it will only contain characters from this set: '0'..'9' and 'a'..'f'.
Exceptions of "md5" can be thrown.
static method new : Digest::MD5 ();
Returns a new Digest::MD5 object which encapsulate the state of the MD5 message-digest algorithm.
method add : void ($data : string);
$data provided as argument are appended to the message we calculate the digest for. The return value is the Digest::MD5 object itself.
Examples:
$md5->add("abc"); $md5->add("efg");
method digest : string ();
Returns the binary digest for the message. The returned string will be 16 bytes long.
method hexdigest : string ();
Same as "digest", but will return the digest in hexadecimal form. The length of the returned string will be 32 and it will only contain characters from this set: '0'..'9' and 'a'..'f'.
SPVM::Digest::MD5 - Github
Digest::MD5 - SPVM::Digest::MD5 is a Perl's Digest::MD5 porting to SPVM
Yuki Kimoto kimoto.yuki@gmail.com
kimoto.yuki@gmail.com
Yoshiyuki Itoh
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::Digest::MD5, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::Digest::MD5
CPAN shell
perl -MCPAN -e shell install SPVM::Digest::MD5
For more information on module installation, please visit the detailed CPAN module installation guide.