|
NAMEVenus::Role::Digestable - Digestable Role ABSTRACTDigestable Role for Perl 5 SYNOPSIS package Example;
use Venus::Class;
attr 'data';
with 'Venus::Role::Dumpable';
with 'Venus::Role::Digestable';
sub execute {
my ($self, @args) = @_;
return [$self->data, @args];
}
package main;
my $example = Example->new(data => 123);
# $example->digest;
# "a6c3d9ae59f31690eddbdd15271e856a6b6f15d5"
DESCRIPTIONThis package modifies the consuming package and provides methods for producing message digests from a dump of the object or the return value of a dispatched method call. All algorithms supported by Digest are supported, e.g. "SHA-1", "SHA-224", "SHA-256", "SHA-384", "SHA-512", "HMAC-MD5", "HMAC-SHA-1", etc. METHODSThis package provides the following methods: b64digestb64digest(string $algo, string $method, any @args) (string) The b64digest method returns a base64 formatted digest of the object or return value of a dispatched method call. The algorithm defaults to "SHA-1". This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.01
bindigestbindigest(string $algo, string $method, any @args) (string) The bindigest method returns a binary formatted digest of the object or return value of a dispatched method call. The algorithm defaults to "SHA-1". This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.01
digestdigest(string $algo, string $method, any @args) (string) The digest method returns a hexadecimal formatted digest of a dump of the object or return value of a dispatched method call. The algorithm defaults to "SHA-1". This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.01
digesterdigester(string $algo, string $method, any @args) (string) The digester method returns a Digest object with a dump of the object or return value of a dispatched method call as the message. The algorithm defaults to "SHA-1". This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.01
hexdigesthexdigest(string $algo, string $method, any @args) (string) The hexdigest method returns a ... formatted digest of the object or return value of a dispatched method call. The algorithm defaults to "SHA-1". This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.01
AUTHORSAwncorp, "awncorp@cpan.org" LICENSECopyright (C) 2022, Awncorp, "awncorp@cpan.org". This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.
|