diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/rng.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/rng.cpp b/src/cmd/rng.cpp index 187fbad1e..0fdec2019 100644 --- a/src/cmd/rng.cpp +++ b/src/cmd/rng.cpp @@ -7,6 +7,10 @@ #include "apps.h" #include <botan/libstate.h> +#if defined(BOTAN_HAS_SYSTEM_RNG) + #include <botan/system_rng.h> +#endif + namespace { int rng(int argc, char* argv[]) @@ -22,6 +26,10 @@ int rng(int argc, char* argv[]) const size_t amt = to_u32bit(argv[argc-1]); const bool raw = (argc == 3 && std::string(argv[1]) == "--raw-entropy"); +#if defined(BOTAN_HAS_SYSTEM_RNG) + std::cout << "System " << hex_encode(system_rng().random_vec(amt)) << "\n"; +#endif + if(!raw) { AutoSeeded_RNG rng; |