X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-perl/blobdiff_plain/660b443cc58d4dd4e92730104429fb64d78c7075..fcd15e0b7a3d0f0ca2f30953573f8d1f6b8e8bd2:/test.pl diff --git a/test.pl b/test.pl deleted file mode 100644 index 01b9f63..0000000 --- a/test.pl +++ /dev/null @@ -1,39 +0,0 @@ -use Catacomb qw(:const); - -package EV; -@ISA = qw(Catacomb::MP::Prime::Gen::Proc); -sub pgen_begin { my ($me, $ev) = @_; print $ev->name(), ": "; } -sub pgen_pass { print "*"; } -sub pgen_fail { print "."; } -sub pgen_done { print "*\n"; } -sub new { my $me = bless { FLUSH => $| }, $_[0]; $| = 1; return $me; } -sub DESTROY { my $me = shift; $| = $me->{FLUSH}; } - -package main; - -$mm = Catacomb::MP->factorial(16); -$mm2 = $mm; -$mm++; -print join(", ", $mm2->gcd(19)), "\n"; - -$md5 = Catacomb::HashClass->find("md5"); -$h = $md5->init(); -$h->hash("abc"); -$hh = $h->done(); -print length($hh), "\n"; -print unpack("H*", $hh), "\n"; - -foreach $i (Catacomb::CipherClass->list()) { - print $i->name(), "\n"; -} - -$p = Catacomb::MP::Prime::gen("p", $Catacomb::random->mp(512, 3), - 0, Catacomb::MP::Prime::Filter->stepper(4), - 5, Catacomb::MP::Prime::Rabin->tester(), - EV->new()); -$q = Catacomb::MP::Prime::gen("q", $Catacomb::random->mp(512, 3), - 0, Catacomb::MP::Prime::Filter->stepper(4), - 5, Catacomb::MP::Prime::Rabin->tester(), - EV->new()); - -print "p = $p\nq = $q\n";