blob: 5ef2ffc40a392d733d4a1db5fbd386c5bdcbe8dd [file] [log] [blame]
Alexander Afanasyeve9fdb802014-02-05 17:36:51 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#include "random.hpp"
8
9#if __clang__
10#pragma clang diagnostic push
11#pragma clang diagnostic ignored "-Wreorder"
12#pragma clang diagnostic ignored "-Wtautological-compare"
13#pragma clang diagnostic ignored "-Wunused-variable"
14#pragma clang diagnostic ignored "-Wunused-function"
15#elif __GNUC__
16#pragma GCC diagnostic ignored "-Wreorder"
17#pragma GCC diagnostic ignored "-Wunused-variable"
18#pragma GCC diagnostic ignored "-Wunused-function"
19#endif
20
21#include <cryptopp/osrng.h>
22
23namespace ndn {
24namespace random {
25
26uint32_t
27generateWord32()
28{
29 static CryptoPP::AutoSeededRandomPool rng;
30
31 return rng.GenerateWord32();
32}
33
34} // namespace random
35} // namespace ndn