#include <random.hpp>
Collaboration diagram for TaoCrypt::RandomNumberGenerator:

Public Member Functions | |
| RandomNumberGenerator () | |
| ~RandomNumberGenerator () | |
| void | GenerateBlock (byte *, word32 sz) |
| byte | GenerateByte () |
| ErrorNumber | GetError () const |
Private Member Functions | |
| RandomNumberGenerator (const RandomNumberGenerator &) | |
| RandomNumberGenerator | operator= (const RandomNumberGenerator &) |
Private Attributes | |
| OS_Seed | seed_ |
| ARC4 | cipher_ |
Definition at line 68 of file random.hpp.
| TaoCrypt::RandomNumberGenerator::RandomNumberGenerator | ( | ) |
Definition at line 50 of file random.cpp.
References cipher_, TaoCrypt::OS_Seed::GenerateSeed(), key, seed_, and TaoCrypt::ARC4::SetKey().
00051 { 00052 byte key[32]; 00053 seed_.GenerateSeed(key, sizeof(key)); 00054 cipher_.SetKey(key, sizeof(key)); 00055 }
Here is the call graph for this function:

| TaoCrypt::RandomNumberGenerator::~RandomNumberGenerator | ( | ) | [inline] |
| TaoCrypt::RandomNumberGenerator::RandomNumberGenerator | ( | const RandomNumberGenerator & | ) | [private] |
Definition at line 59 of file random.cpp.
References cipher_, memset, and TaoCrypt::ARC4::Process().
Referenced by yaSSL::RandomPool::Fill(), GenerateByte(), TaoCrypt::RSA_BlockType2::Pad(), and TaoCrypt::Integer::Randomize().
Here is the call graph for this function:

Here is the caller graph for this function:

| byte TaoCrypt::RandomNumberGenerator::GenerateByte | ( | ) |
Definition at line 66 of file random.cpp.
References GenerateBlock().
00067 { 00068 byte b; 00069 GenerateBlock(&b, 1); 00070 00071 return b; 00072 }
Here is the call graph for this function:

| ErrorNumber TaoCrypt::RandomNumberGenerator::GetError | ( | ) | const [inline] |
Definition at line 76 of file random.hpp.
References TaoCrypt::OS_Seed::GetError(), seed_, and TaoCrypt::Error::What().
Referenced by yaSSL::RandomPool::GetError().
00076 { return seed_.GetError().What(); }
Here is the call graph for this function:

Here is the caller graph for this function:

| RandomNumberGenerator TaoCrypt::RandomNumberGenerator::operator= | ( | const RandomNumberGenerator & | ) | [private] |
ARC4 TaoCrypt::RandomNumberGenerator::cipher_ [private] |
Definition at line 79 of file random.hpp.
Referenced by GenerateBlock(), and RandomNumberGenerator().
1.4.7

