Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6entropy.h
Go to the documentation of this file.
1 
13 #ifndef P6ENTROPY_H__
14 #define P6ENTROPY_H__ 1
15 
16 #include "p6com.h"
17 
18 namespace P6R {
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
42 const P6ENTROPYFLAGS P6ENTROPY_NOFLAGS = 0x00000000;
43 const P6ENTROPYFLAGS P6ENTROPY_LOW = 0x00000001;
44 const P6ENTROPYFLAGS P6ENTROPY_HIGH = 0x00000002;
45 const P6ENTROPYFLAGS P6ENTROPY_QUALITYMASK = 0x00000003;
46 
58 interface p6IEntropySource : public p6ICom
59 {
69  P6COMMETHOD initialize( P6ENTROPYFLAGS flags ) = 0;
70 
88  P6COMMETHOD fillBuffer( P6CHAR* pEntropy, P6UINT32& bufSize ) = 0;
89 
100  P6COMMETHOD getQuality(P6ENTROPYFLAGS *pQuality) = 0;
101 };
102 
103 // {EF8E24A5-62E2-4b79-B8D5-1D6084DB699D}
104 #define IF_p6IEntropySource {0xef8e24a5,0x62e2,0x4b79,{0xb8,0xd5,0x1d,0x60,0x84,0xdb,0x69,0x9d}}
105 
106 // {565BCB1A-8FF8-422C-A1CE-ECA0A13BD790}
107 #define COMP_p6EntropySource {0x565BCB1A,0x8FF8,0x422C,{0xA1,0xCE,0xEC,0xA0,0xA1,0x3B,0xD7,0x90}}
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 } // namespace
114 
115 #endif
116 
117 
unsigned int P6UINT32
Definition: p6types.h:40
P6UINT32 P6ENTROPYFLAGS
P6ENTROPYFLAGS.
Definition: p6entropy.h:41
virtual P6R::P6ERR fillBuffer(P6CHAR *pEntropy, P6UINT32 &bufSize)=0
This method fills the provided buffer with the entropy source to be used directly to seed a random nu...
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
const P6ENTROPYFLAGS P6ENTROPY_HIGH
Definition: p6entropy.h:44
const P6ENTROPYFLAGS P6ENTROPY_NOFLAGS
Definition: p6entropy.h:42
const P6ENTROPYFLAGS P6ENTROPY_QUALITYMASK
Definition: p6entropy.h:45
const P6ENTROPYFLAGS P6ENTROPY_LOW
Definition: p6entropy.h:43
This is a plugin interface for the customer of the ICrypto interface to enhance the built in entropy ...
Definition: p6entropy.h:58
virtual P6R::P6ERR initialize(P6ENTROPYFLAGS flags)=0
This method initializes the entropy source for use and must be called before any other method...
#define P6COMMETHOD
Definition: p6types.h:872
P6COM definitions and interfaces.
virtual P6R::P6ERR getQuality(P6ENTROPYFLAGS *pQuality)=0
Returns the quality of the entropy provided by the source accoring to the initialization flags used w...
char P6CHAR
Narrow character type.
Definition: p6types.h:71