BEGIN { $| = 1; print "1..1\n"; }
END {print "not ok 1\n" unless $loaded;}
use Crypt::OpenSSL::Random;
$loaded = 1;
print "ok 1\n";
my $test_number = 2;
sub my_test
{
my($cond) = @_;
my $number = $test_number++;
if ($cond)
{
print "ok $number\n";
}
else
{
my ($pack, $file, $line) = caller;
print "not ok $number - from $file:$line\n";
}
}
Crypt::OpenSSL::Random::random_seed("Here are 19 bytes...");
my_test(Crypt::OpenSSL::Random::random_status());
my_test(length(Crypt::OpenSSL::Random::random_bytes(53)), 53);
my_test(length(Crypt::OpenSSL::Random::random_pseudo_bytes(53)), 53);