diff options
Diffstat (limited to 'src/lib/prov/tpm/tpm.h')
-rw-r--r-- | src/lib/prov/tpm/tpm.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/lib/prov/tpm/tpm.h b/src/lib/prov/tpm/tpm.h index 4a9dcd3c6..15bc216ab 100644 --- a/src/lib/prov/tpm/tpm.h +++ b/src/lib/prov/tpm/tpm.h @@ -76,29 +76,22 @@ class BOTAN_DLL TPM_RNG : public RandomNumberGenerator public: TPM_RNG(TPM_Context& ctx) : m_ctx(ctx) {} + void add_entropy(const byte in[], size_t in_len) override + { + m_ctx.stir_random(in, in_len); + } + void randomize(byte out[], size_t out_len) override { m_ctx.gen_random(out, out_len); } - void clear() override {} - std::string name() const override { return "TPM_RNG"; } - size_t reseed_with_sources(Entropy_Sources&, - size_t, - std::chrono::milliseconds) override - { - // TODO: poll and stir - return 0; - } + bool is_seeded() const override { return true; } - void add_entropy(const byte in[], size_t in_len) override - { - m_ctx.stir_random(in, in_len); - } + void clear() const override {} - bool is_seeded() const override { return true; } private: TPM_Context& m_ctx; }; |