/usr/include/Wt/WRandom is in libwt-dev 3.1.10-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef WRANDOM_H_
#define WRANDOM_H_
#include <Wt/WDllDefs.h>
#include <string>
namespace Wt {
/*! \class WRandom Wt/WRandom Wt/WRandom
* \brief Random number generator.
*
* If an implementation is available for your OS, this class generates
* high-entropy random numbers, suitable for secret ids (e.g. this is
* used to generate %Wt's session IDs).
*/
class WT_API WRandom
{
public:
/*! \brief Returns a random number.
*
* This returns a high-entropy (non deterministic) random number on
* platforms for which this is supported (currently only Linux,
* Windows and MacOS X).
*/
static unsigned int get();
/*! \brief A utility method to generate a random id.
*
* The id is composed of small and capitalized roman characters and
* numbers [a-zA-Z0-9].
*
* \sa get()
*/
static std::string generateId(int length = 16);
};
}
#endif // IFNDEF WTRANDOM_H_
|