Algorithm-IRCSRP2
view release on metacpan or search on metacpan
lib/Algorithm/IRCSRP2.pm view on Meta::CPAN
package Algorithm::IRCSRP2;
BEGIN {
$Algorithm::IRCSRP2::VERSION = '0.501';
}
# ABSTRACT: IRC channel encryption algorithm
use Moose;
# core
use Data::Dumper;
use Digest::SHA;
use MIME::Base64;
use Math::BigInt only => 'GMP,Pari';
# CPAN
use Crypt::OpenSSL::AES;
# local
use Algorithm::IRCSRP2::Utils qw(:all);
has 'error' => (
'isa' => 'Str',
'is' => 'rw',
);
has 'nickname' => (
'isa' => 'Str',
'is' => 'rw',
'default' => 'unknown'
);
has 'debug_cb' => (
'isa' => 'CodeRef',
'is' => 'rw',
'default' => sub {
sub {
my @args = @_;
@args = grep { defined($_) } @args;
print(@args);
}
}
);
has '_orig_debug_cb' => (
'isa' => 'CodeRef',
'is' => 'rw',
'default' => sub {
sub {
}
}
);
has 'am_i_dave' => (
'isa' => 'Bool',
'is' => 'ro',
);
has 'cbc_blocksize' => (
'isa' => 'Int',
'is' => 'ro',
'default' => 16
);
# -------- methods --------
sub BUILD {
my ($self) = @_;
my $orig_cb = $self->debug_cb;
$self->_orig_debug_cb($orig_cb);
( run in 1.223 second using v1.01-cache-2.11-cpan-39bf76dae61 )