aboutsummaryrefslogtreecommitdiffstats
path: root/util/random/entropy.h
blob: 62029c1b636328152540e5aaa63622af2ab5757b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

class TBuffer;
class IInputStream;

/*
 * fast entropy pool, based on good prng, can lock for some time
 * initialized with some bits from system entropy pool
 * think as /dev/urandom replacement
 */
IInputStream& EntropyPool();

/*
 * fast(non-blocking) entropy pool, useful for seeding PRNGs
 */
IInputStream& Seed();

/*
 * Re-initialize entropy pool - useful after forking in multi-process programs.
 */
void ResetEntropyPool();