📄 fnaprng.h
字号:
/* Copyright 2001,2002,2003 NAH6 BV
* All Rights Reserved
*
* $Header: /var/lib/cvs/secphone/ui/rng/fortuna/fnaPRNG.h,v 1.3 2003/11/21 12:39:24 itsme Exp $
*
*
*/
#ifndef __FNAPRNG_H__
//--------------------------------------------------------------------------
#include "vectorutils.h"
#include "nhThread.h"
#include "fnaAccumulator.h"
#include "fnaEntropySource.h"
typedef std::vector<HANDLE> EventList;
typedef std::vector<EntropySource*> SourceList;
#define PRNG_POLL_INTERVAL 2000
class PRNG : public NHThread {
public:
PRNG();
~PRNG();
bool RandomData(int nBytesRequested, ByteVector& r);
void AddSource(EntropySource* src);
protected:
virtual DWORD ThreadProc();
virtual const char* name() const { return "PRNG"; }
private:
Accumulator m_accu;
// list of registered entropy sources
SourceList m_sources;
// event list is needed by WaitForMultipleEvents
EventList m_sourceevents;
};
#define __FNAPRNG_H__
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -