/* NOTE: Not at all optimized. */
void
knuth_lfib_get_array(struct knuth_lfib_ctx *ctx,
- unsigned n, uint32_t *a)
+ size_t n, uint32_t *a)
{
unsigned i;
/* NOTE: Not at all optimized. */
void
knuth_lfib_random(struct knuth_lfib_ctx *ctx,
- unsigned n, uint8_t *dst)
+ size_t n, uint8_t *dst)
{
/* Use 24 bits from each number, xoring together some of the
bits. */
/* Get an array of numbers */
void
knuth_lfib_get_array(struct knuth_lfib_ctx *ctx,
- unsigned n, uint32_t *a);
+ size_t n, uint32_t *a);
/* Get an array of octets. */
void
knuth_lfib_random(struct knuth_lfib_ctx *ctx,
- unsigned n, uint8_t *dst);
+ size_t n, uint8_t *dst);
#ifdef __cplusplus
}
/* Randomness. Used by key generation and dsa signature creation. */
typedef void nettle_random_func(void *ctx,
- unsigned length, uint8_t *dst);
+ size_t length, uint8_t *dst);
/* Progress report function, mainly for key generation. */
typedef void nettle_progress_func(void *ctx, int c);
void
yarrow256_seed(struct yarrow256_ctx *ctx,
- unsigned length,
+ size_t length,
const uint8_t *seed_file);
/* Returns 1 on reseed */
int
yarrow256_update(struct yarrow256_ctx *ctx,
unsigned source, unsigned entropy,
- unsigned length, const uint8_t *data);
+ size_t length, const uint8_t *data);
void
-yarrow256_random(struct yarrow256_ctx *ctx, unsigned length, uint8_t *dst);
+yarrow256_random(struct yarrow256_ctx *ctx, size_t length, uint8_t *dst);
int
yarrow256_is_seeded(struct yarrow256_ctx *ctx);
void
yarrow256_seed(struct yarrow256_ctx *ctx,
- unsigned length,
+ size_t length,
const uint8_t *seed_file)
{
assert(length > 0);
int
yarrow256_update(struct yarrow256_ctx *ctx,
unsigned source_index, unsigned entropy,
- unsigned length, const uint8_t *data)
+ size_t length, const uint8_t *data)
{
enum yarrow_pool_id current;
struct yarrow_source *source;
}
void
-yarrow256_random(struct yarrow256_ctx *ctx, unsigned length, uint8_t *dst)
+yarrow256_random(struct yarrow256_ctx *ctx, size_t length, uint8_t *dst)
{
assert(ctx->seeded);