Skip to content

Commit a7e6447

Browse files
committed
Stringify return from get_mp_int() method.
1 parent e36e26b commit a7e6447

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/Crypt/OpenPGP/Buffer.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ sub get_mp_int {
99
my $bytes = int(($bits + 7) / 8);
1010
my $off = $buf->{offset};
1111
$buf->{offset} += $bytes;
12-
bin2mp($buf->bytes($off, $bytes));
12+
my $int = bin2mp($buf->bytes($off, $bytes));
13+
"$int";
1314
}
1415

1516
sub put_mp_int {

t/02-buffer.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use strict;
22
use Test::More tests => 6;
33

4-
use Math::Pari;
4+
use Math::BigInt;
55
use Crypt::OpenPGP::Buffer;
66

7-
my @num = map { PARI( $_ ) } qw( 34093840983 99999999999999999999 1 );
7+
my @num = map { Math::BigInt->new( $_ ) } qw( 34093840983 99999999999999999999 1 );
88

99
for my $n ( @num ) {
1010
my $buffer = Crypt::OpenPGP::Buffer->new;

0 commit comments

Comments
 (0)