blob: 2c7db52c0b16a0197cf80041f19cd896f8420e80 [file] [log] [blame]
Jens Wiklander02389a92016-12-16 11:13:38 +01001/*
2 * Copyright (c) 2016, Linaro Limited
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef __RAND_STREAM_H
15#define __RAND_STREAM_H
16
17#include <sys/types.h>
18
19struct rand_stream;
20
21struct rand_stream *rand_stream_alloc(int seed, size_t stream_buffer_size);
22void rand_stream_free(struct rand_stream *rs);
23
24const void *rand_stream_peek(struct rand_stream *rs, size_t *num_bytes);
25void rand_stream_advance(struct rand_stream *rs, size_t num_bytes);
26void rand_stream_read(struct rand_stream *rs, void *buf, size_t num_bytes);
27
28#endif /*__RAND_STREAM_H*/