CppCMS
cppcms/urandom.h
00001 
00002 //                                                                             
00003 //  Copyright (C) 2008-2012  Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>     
00004 //                                                                             
00005 //  See accompanying file COPYING.TXT file for licensing details.
00006 //
00008 #ifndef CPPCMS_URANDOM_H
00009 #define CPPCMS_URANDOM_H
00010 
00011 #include <cppcms/defs.h>
00012 #include <booster/hold_ptr.h>
00013 #include <booster/noncopyable.h>
00014 
00015 namespace cppcms {
00016 
00023         class CPPCMS_API urandom_device : public booster::noncopyable {
00024         public:
00025 
00029                 urandom_device();
00030 
00034                 ~urandom_device();
00035                 
00039                 void generate(void *ptr,unsigned n);
00040 
00041         private:
00042                 struct _data;
00043                 booster::hold_ptr<_data> d;
00044                 
00045 
00046         };
00047 }
00048 
00049 
00050 #endif