Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
390d5288
Commit
390d5288
authored
Oct 09, 2002
by
Niels Möller
Browse files
(nettle_mpz_random, nettle_mpz_random_size): Added
prototypes. Rev: src/nettle/bignum.h:1.4
parent
8b600c82
Changes
1
Hide whitespace changes
Inline
Side-by-side
bignum.h
View file @
390d5288
...
...
@@ -26,6 +26,8 @@
#ifndef NETTLE_BIGNUM_H_INCLUDED
#define NETTLE_BIGNUM_H_INCLUDED
#include
"nettle-meta.h"
#include
<gmp.h>
#include
<inttypes.h>
...
...
@@ -45,4 +47,17 @@ void
nettle_mpz_init_set_str_256
(
mpz_t
x
,
unsigned
length
,
const
uint8_t
*
s
);
/* Returns a uniformly distributed random number 0 <= x < 2^n */
void
nettle_mpz_random_size
(
mpz_t
x
,
void
*
ctx
,
nettle_random_func
random
,
unsigned
bits
);
/* Returns a number x, almost uniformly random in the range
* 0 <= x < n. */
void
nettle_mpz_random
(
mpz_t
x
,
void
*
ctx
,
nettle_random_func
random
,
const
mpz_t
n
);
#endif
/* NETTLE_BIGNUM_H_INCLUDED */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment