Commit 53950b02 authored by Timothy Legge's avatar Timothy Legge Committed by Milan P. Stanić
Browse files

community/perl-crypt-random: upgrade to 1.54

parent a52d3ddb
Pipeline #83825 passed with stages
in 1 minute and 22 seconds
......@@ -37,5 +37,5 @@ package() {
sha512sums="
cad58c3598efd2c7bd0ea611f31eeec99bbb61029df3f29abcc3ac951b1edc03829f1dd3c5f4d1c09a9914cae9eb171ea467562e3739122f1cf48b1119c42d29 Crypt-Random-1.54.tar.gz
b557e10ad569f6730c0e5903af5cb6c147660853c34e1f704d8617f4f0fa0c72da2e2f7f3b52e2408fbd1ef30c7687ac8cf8917a519e1bf5587ed1259f886c7f random.patch
f069c1f7644ad2b5ff69f86ecf5605b31216582a0436893c3f149999f1cc9acc848821b4528b2b6dd71df24ce6f9dc46d686d70c00373b50665db009c1546a1b random.patch
"
diff -ur Crypt-Random-1.54/lib/Crypt/Random.pm Crypt-Random-1.52/lib/Crypt/Random.pm
--- Crypt-Random-1.54/lib/Crypt/Random.pm 2021-06-03 15:28:47.000000000 -0300
+++ Crypt-Random-1.52/lib/Crypt/Random.pm 2018-12-22 15:12:01.000000000 -0400
@@ -96,9 +96,8 @@
diff -ur Crypt-Random-1.54/t/makerandom_itv.t Crypt-Random-1.52/t/makerandom_itv.t
--- Crypt-Random-1.54/t/makerandom_itv.t 2021-06-03 15:11:56.000000000 -0300
+++ Crypt-Random-1.52/t/makerandom_itv.t 2018-12-22 14:49:20.000000000 -0400
@@ -9,18 +9,13 @@
use lib '../lib';
use Crypt::Random qw(makerandom_itv);
my $itv = Mod ( 0, $b - $a );
my $size = length ( $itv ) * 5;
- #my $random = makerandom %params, Size => $size; # extra we can get rid of it
+ my $random = makerandom %params, Size => $size;
- my $random;
do { $random = makerandom %params, Size => $size, Uniform => 1 } # should always be uniform
while ( $random >= (PARI(2)**$size) - ((PARI(2)**$size) % lift($b-$a)));
-print "1..6\n";
+print "1..5\n";
my $sample = 100;
my $i = 1;
-for my $limit ( '10', '1000', '10000', '100000', '1000000000', '1000000000000' ) {
- my $success = 1;
+for my $limit ( '1000', '10000', '100000', '1000000000', '1000000000000' ) {
for ( 1 .. $sample ) {
- my $num = makerandom_itv ( Lower=>0, Upper=>$limit, Uniform => 1 );
- print "generated random in interval 0 - $limit -> $num\n";
- unless ($num >= 0 and $num < $limit) {
- $success = 0;
- }
+ print makerandom_itv ( Lower=>0, Upper=>$limit, Uniform => 1 ) . "\n";
}
- print "ok ". $i++."\n" if $success;
+ print "ok ". $i++."\n";
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment