📄 es_unix.h
字号:
/************************************************** Unix EntropySource Header File ** (C) 1999-2002 The Botan Project **************************************************/#include <botan/base.h>#include <vector>#ifndef BOTAN_EXT_ENTROPY_SRC_UNIX_H__#define BOTAN_EXT_ENTROPY_SRC_UNIX_H__namespace Botan {struct Unix_Program { Unix_Program(const std::string& n, const std::string a, u32bit p) { name = n; args = a; priority = p; working = true; } Unix_Program(const std::string& n, u32bit p) { name = n; priority = p; working = true; } std::string name, args; u32bit priority; bool working; };class Unix_EntropySource : public EntropySource { public: u32bit fast_poll(byte[], u32bit); u32bit slow_poll(byte[], u32bit); void add_sources(const Unix_Program[], u32bit); Unix_EntropySource(bool = true); Unix_EntropySource(const Unix_Program[], u32bit, bool = true); private: static const Unix_Program DEFAULT_SOURCES[]; void add_default_sources(); u32bit gather(byte[], u32bit, u32bit); u32bit gather_entropy(Unix_Program&); void timestamp(); SecureBuffer<byte, 256> buffer; std::vector<Unix_Program> sources; u32bit position; };}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -