| 420 | } // End main() |
| 421 | |
| 422 | void FIPS140_GenerateRandomFiles() |
| 423 | { |
| 424 | #ifdef OS_RNG_AVAILABLE |
| 425 | DefaultAutoSeededRNG rng; |
| 426 | RandomNumberStore store(rng, ULONG_MAX); |
| 427 | |
| 428 | for (unsigned int i=0; i<100000; i++) |
| 429 | store.TransferTo(FileSink((IntToString(i) + ".rnd").c_str()).Ref(), 20000); |
| 430 | #else |
| 431 | cout << "OS provided RNG not available.\n"; |
| 432 | exit(-1); |
| 433 | #endif |
| 434 | } |
| 435 | |
| 436 | template <class T, bool NON_NEGATIVE> |
| 437 | T StringToValue(const std::string& str) { |
no test coverage detected