class Poco::RandomBuf
Overview
This streambuf generates random data. Moreā¦
#include <RandomStream.h> class RandomBuf: public Poco::BasicBufferedStreamBuf { public: // methods int readFromDevice( char* buffer, std::streamsize length ); };
Inherited Members
public: // methods virtual int_type overflow(int_type c); virtual int_type underflow(); virtual int sync(); protected: // typedefs typedef std::basic_streambuf<ch, tr> Base; typedef std::basic_ios<ch, tr> IOS; typedef ch char_type; typedef tr char_traits; typedef ba Allocator; typedef Base::int_type int_type; typedef Base::pos_type pos_type; typedef Base::off_type off_type; typedef IOS::openmode openmode; // methods void setMode(openmode mode); openmode getMode() const;
Detailed Documentation
This streambuf generates random data.
On Windows NT, the cryptographic API is used. On Unix, /dev/random is used, if available. Otherwise, a random number generator, some more-or-less random data and a SHA-1 digest is used to generate random data.