Skip to content
Snippets Groups Projects
Commit c850a0b5 authored by Niels Möller's avatar Niels Möller
Browse files

* examples/random-prime.c (main): Updated for nettle_random_prime

change.
* testsuite/random-prime-test.c (test_main): Likewise.

Rev: nettle/examples/random-prime.c:1.3
Rev: nettle/testsuite/random-prime-test.c:1.2
parent a70d82ef
No related branches found
No related tags found
No related merge requests found
...@@ -126,8 +126,9 @@ main(int argc, char **argv) ...@@ -126,8 +126,9 @@ main(int argc, char **argv)
start = clock(); start = clock();
nettle_random_prime(p, bits, nettle_random_prime(p, bits, 0,
&yarrow, (nettle_random_func *) yarrow256_random); &yarrow, (nettle_random_func *) yarrow256_random,
NULL, NULL);
end = clock(); end = clock();
......
...@@ -17,8 +17,10 @@ test_main(void) ...@@ -17,8 +17,10 @@ test_main(void)
if (verbose) if (verbose)
fprintf(stderr, "bits = %d\n", bits); fprintf(stderr, "bits = %d\n", bits);
nettle_random_prime(p, bits, nettle_random_prime(p, bits, 0,
&lfib, (nettle_random_func *) knuth_lfib_random ); &lfib, (nettle_random_func *) knuth_lfib_random,
NULL, NULL);
ASSERT (mpz_sizeinbase (p, 2) == bits);
ASSERT (mpz_probab_prime_p(p, 25)); ASSERT (mpz_probab_prime_p(p, 25));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment