Botan 3.6.0
Crypto and TLS for C&
jitter_rng.h
Go to the documentation of this file.
1/*
2* CPU Jitter Random Number Generator
3* (C) 2024 Planck Security S.A.
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_JITTER_RNG_H_
9#define BOTAN_JITTER_RNG_H_
10
11#include <botan/rng.h>
12
13namespace Botan {
14
15struct Jitter_RNG_Internal;
16
17/*
18* RNG using libjitterentropy (https://github.com/smuellerDD/jitterentropy-library).
19*/
21 public:
22 Jitter_RNG();
24
25 std::string name() const override { return "JitterRNG"; }
26
27 bool is_seeded() const override { return true; }
28
29 bool accepts_input() const override { return false; }
30
31 void clear() override;
32
33 private:
34 void fill_bytes_with_input(std::span<uint8_t> out, std::span<const uint8_t> in) override;
35
36 std::unique_ptr<Jitter_RNG_Internal> m_jitter;
37};
38} // namespace Botan
39
40#endif
std::string name() const override
Definition jitter_rng.h:25
bool is_seeded() const override
Definition jitter_rng.h:27
bool accepts_input() const override
Definition jitter_rng.h:29
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31