1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (c) 2016, Linaro Limited 4 */ 5 6 #ifndef __RAND_STREAM_H 7 #define __RAND_STREAM_H 8 9 #include <sys/types.h> 10 11 struct rand_stream; 12 13 struct rand_stream *rand_stream_alloc(int seed, size_t stream_buffer_size); 14 void rand_stream_free(struct rand_stream *rs); 15 16 const void *rand_stream_peek(struct rand_stream *rs, size_t *num_bytes); 17 void rand_stream_advance(struct rand_stream *rs, size_t num_bytes); 18 void rand_stream_read(struct rand_stream *rs, void *buf, size_t num_bytes); 19 20 #endif /*__RAND_STREAM_H*/ 21