| 1 | package Web::ID::RSAKey; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 3 | $Web::ID::RSAKey::AUTHORITY = 'cpan:TOBYINK'; | |||||||||
| 8 | 3 | $Web::ID::RSAKey::VERSION = '1.927'; | |||||||||
| 9 | } | ||||||||||
| 10 | |||||||||||
| 11 | 3 | ▶ | use Web::ID::Types -types; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 3 | ▶ | use Web::ID::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 3 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 3 | ▶ | use namespace::sweep; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | |||||||||||
| 17 | 3 | for (qw( exponent modulus )) | |||||||||
| 18 | { | ||||||||||
| 19 | 6 | has $_ => ( | |||||||||
| 20 | is => read_only, | ||||||||||
| 21 | isa => Bigint, | ||||||||||
| 22 | required => true, | ||||||||||
| 23 | coerce => true, | ||||||||||
| 24 | ); | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | sub rsa_equal | ||||||||||
| 28 | 5 | ▶ | { | ||||||||
|
Subroutine
rsa_equal: called CC=5 SCAR=16.8
Pod
documented
| |||||||||||
| 29 | 5 | my ($self, $other) = @_; | |||||||||
| 30 | |||||||||||
| 31 | 5 | foreach (qw(exponent modulus)) | |||||||||
| 32 | { | ||||||||||
| 33 | 10 | ▶ | my $m1 = $self->can($_) or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 10 | ▶ | my $m2 = $other->can($_) or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 10 | ▶ | return unless $self->$m1 == $other->$m2; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 5 | return true; | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 3 | __PACKAGE__ | |||||||||
| 42 | __END__ | ||||||||||