randpool.h
来自「一个DES,RSA,MD5,RC4等加密算法的源码」· C头文件 代码 · 共 39 行
H
39 行
#ifndef CRYPTOPP_RANDPOOL_H
#define CRYPTOPP_RANDPOOL_H
#include "cryptlib.h"
#include "filters.h"
NAMESPACE_BEGIN(CryptoPP)
//! Randomness Pool
/*! This class can be used to generate
pseudorandom bytes after seeding the pool with
the Put() methods */
class RandomPool : public RandomNumberGenerator,
public Sink
{
public:
//! poolSize must be greater than 16
RandomPool(unsigned int poolSize=384);
//! seed the pool
void Put(byte inByte);
//! seed the pool
void Put(const byte *inString, unsigned int length);
byte GenerateByte();
void GenerateBlock(byte *output, unsigned int size);
protected:
void Stir();
private:
SecByteBlock pool, key;
unsigned int addPos, getPos;
};
NAMESPACE_END
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?