summaryrefslogtreecommitdiffhomepage
path: root/src/prng.h
blob: 9c32d08511825d7327ad7c5c107f8f40730a520b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 *   Copyright (C) 2021 Mikael Magnusson <mikma@users.sourceforge.net>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License version 2
 *   as published by the Free Software Foundation.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License version 2 for more details.
 *
 */
#pragma once

#include "prng.h"

#include <stddef.h>
#include <stdint.h>

typedef struct prng_context_s prng_context_t;

prng_context_t *prng_alloc();
void prng_setup(prng_context_t *ctx);
void prng_starts(prng_context_t *ctx);
void prng_update(prng_context_t *ctx, const uint8_t *input, size_t ilen);
void prng_finish(prng_context_t *ctx, uint8_t *output, uint8_t *output2);