Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6random.h
Go to the documentation of this file.
1 
10 #ifndef P6RANDOM_H__
11 #define P6RANDOM_H__ 1
12 
13 #include "p6entropy.h"
14 
15 
16 #ifdef __cplusplus
17 namespace P6R {
18 extern "C" {
19 #endif
20 
31 static const P6RANDFLAGS P6RAND_NOFLAGS = 0x00000000;
32 static const P6RANDFLAGS P6RAND_TRACEON = 0x00000001;
33 
34 
35 #undef INTERFACE
36 #define INTERFACE p6IRandomInit
38 {
59  P6DECLCOMMETHOD(initialize)(P6THIS_ P6RANDFLAGS flags, p6IEntropySource* pSource ) P6PURE;
60 };
61 
62 /*{DCDA7529-475E-ED58-D81E-B9AE78496939}*/
63 #define IF_p6IRandomInit {0xDCDA7529,0x475E,0xED58,{0xD8,0x1E,0xB9,0xAE,0x78,0x49,0x69,0x39}};
64 
65 
97 #undef INTERFACE
98 #define INTERFACE p6IRandom
100 {
116  P6DECLCOMMETHOD(genRandomBytes)(P6THIS_ P6UCHAR* pBuffer, P6UINT32 cBuffer ) P6PURE;
117 
128  P6DECLCOMMETHOD(reSeed)(P6THIS) P6PURE;
129 
146  P6DECLCOMMETHOD(getQuality)(P6THIS_ P6ENTROPYFLAGS *pQuality) P6PURE;
147 };
148 
149 // {5A77D043-2FB1-4834-AE30-3F2B5678607A}
150 #define IF_p6IRandom {0x5A77D043,0x2FB1,0x4834,{0xAE,0x30,0x3F,0x2B,0x56,0x78,0x60,0x7A}}
151 
152 // {AD16A285-9FF3-4CFF-A190-E3E06B9D0B4C}
153 #define COMP_p6Random {0xAD16A285,0x9FF3,0x4CFF,{0xA1,0x90,0xE3,0xE0,0x6B,0x9D,0x0B,0x4C}}
154 
155 #define P6_ENTROPY_SERVICE_INTERFACE "p6r.com.entropy.service"
156 
157 #ifdef __cplusplus
158 } /* extern "C" */
159 } // namespace
160 #endif
161 
162 #endif
163 
unsigned char P6UCHAR
Definition: p6types.h:108
uint32_t P6UINT32
Definition: p6types.h:77
#define P6DECLAREICOM
Definition: p6defs.h:191
#define P6PURE
Definition: p6defs.h:192
P6UINT32 P6ENTROPYFLAGS
P6ENTROPYFLAGS.
Definition: p6entropy.h:40
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
Provides a cryptographically strong random number generator.
Definition: p6random.h:99
P6UINT32 P6RANDFLAGS
P6RANDFLAGS.
Definition: p6random.h:30
This is a plugin interface for the customer of the ICrypto interface to enhance the built in entropy ...
Definition: p6entropy.h:59
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
#define P6THIS
Definition: p6defs.h:194
Interface definition for 3rd parties to provide separate entropy implementations. ...
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188