| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| /** |
| * Copyright (C) 2014 Named Data Networking Project |
| * See COPYING for copyright and distribution information. |
| */ |
| |
| #include "random.hpp" |
| |
| #if __clang__ |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wreorder" |
| #pragma clang diagnostic ignored "-Wtautological-compare" |
| #pragma clang diagnostic ignored "-Wunused-variable" |
| #pragma clang diagnostic ignored "-Wunused-function" |
| #elif __GNUC__ |
| #pragma GCC diagnostic ignored "-Wreorder" |
| #pragma GCC diagnostic ignored "-Wunused-variable" |
| #pragma GCC diagnostic ignored "-Wunused-function" |
| #endif |
| |
| #include <cryptopp/osrng.h> |
| |
| namespace ndn { |
| namespace random { |
| |
| uint32_t |
| generateWord32() |
| { |
| static CryptoPP::AutoSeededRandomPool rng; |
| |
| return rng.GenerateWord32(); |
| } |
| |
| } // namespace random |
| } // namespace ndn |