Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6sign.h
Go to the documentation of this file.
1 
11 #ifndef P6SIGN_H__
12 #define P6SIGN_H__ 1
13 
14 #include "p6crypto.h"
15 #include "p6cryptokey.h"
16 
17 #ifdef __cplusplus
18 namespace P6R {
19 extern "C" {
20 #endif
21 
45 typedef enum {
56 } P6SIGNHMAC;
57 
70 static const P6SIGNFLAGS P6SIGN_NOFLAGS = 0x00000000;
71 static const P6SIGNFLAGS P6SIGN_TRACEON = 0x00000001;
72 static const P6SIGNFLAGS P6SIGN_NONULLTERM = 0x00000002;
73 
74 
82 #undef INTERFACE
83 #define INTERFACE p6ISign
85 {
100  P6DECLCOMMETHOD(initialize)(P6THIS_ P6SIGNFLAGS flags ) P6PURE;
101 
119  P6DECLCOMMETHOD(setKey)(P6THIS_ p6ICryptoKey* pKey ) P6PURE;
120 
155  P6DECLCOMMETHOD(sign)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6CRYPTODATASINK* pOutData, P6BOOL base64Encode, P6SIGNHMAC hmac) P6PURE;
156 
188  P6DECLCOMMETHOD(verify)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6CRYPTODATASOURCE* pSignature, P6BOOL base64Encoded, P6SIGNHMAC hmac) P6PURE;
189 
226  P6DECLCOMMETHOD(signDSARaw)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6UCHAR* pR, P6UINT32* pRLength, P6UCHAR* pS, P6UINT32* pSLength ) P6PURE;
227 
253  P6DECLCOMMETHOD(verifyDSARaw)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6UCHAR* pR, P6UINT32 rLength, P6UCHAR* pS, P6UINT32 sLength ) P6PURE;
254 };
255 
256 // {F1D98E80-E10F-448f-81FA-E94B75B7183A}
257 #define IF_p6ISign {0xf1d98e80,0xe10f,0x448f,{0x81,0xfa,0xe9,0x4b,0x75,0xb7,0x18,0x3a}}
258 
259 
267 #undef INTERFACE
268 #define INTERFACE p6ISign2
270 {
285  P6DECLCOMMETHOD(initialize)(P6THIS_ P6SIGNFLAGS flags ) P6PURE;
286 
304  P6DECLCOMMETHOD(setKey)(P6THIS_ p6ICryptoKey* pKey ) P6PURE;
305 
340  P6DECLCOMMETHOD(sign)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6CRYPTODATASINK* pOutData, P6BOOL base64Encode, P6SIGNHMAC hmac) P6PURE;
341 
373  P6DECLCOMMETHOD(verify)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6CRYPTODATASOURCE* pSignature, P6BOOL base64Encoded, P6SIGNHMAC hmac) P6PURE;
374 
411  P6DECLCOMMETHOD(signDSARaw)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6UCHAR* pR, P6UINT32* pRLength, P6UCHAR* pS, P6UINT32* pSLength ) P6PURE;
412 
438  P6DECLCOMMETHOD(verifyDSARaw)(P6THIS_ P6CRYPTODATASOURCE* pInData, P6UCHAR* pR, P6UINT32 rLength, P6UCHAR* pS, P6UINT32 sLength ) P6PURE;
439 
458  P6DECLCOMMETHOD(signRSA)(P6THIS_ P6BSTR* pInData, P6BSTR* pSignature) P6PURE;
459 
479  P6DECLCOMMETHOD(verifyRSA)(P6THIS_ P6BSTR* pInData, P6BSTR* pSignature) P6PURE;
480 };
481 
482 // {8EADE3E7-4D38-4ce0-8829-D159D46CAE77}
483 #define IF_p6ISign2 {0x8eade3e7,0x4d38,0x4ce0,{0x88,0x29,0xd1,0x59,0xd4,0x6c,0xae,0x77}}
484 
485 // {13B2B4BA-9258-422b-AF54-FE2118B145B2}
486 #define COMP_p6Sign {0x13b2b4ba,0x9258,0x422b,{0xaf,0x54,0xfe,0x21,0x18,0xb1,0x45,0xb2}}
487 
488 #ifdef __cplusplus
489 } /* extern "C" */
490 } // namespace
491 #endif
492 
493 
494 
495 #endif
496 
497 
498 
P6SIGNHMAC
Supported HMAC algorthms for signing:
Definition: p6sign.h:45
unsigned char P6UCHAR
Definition: p6types.h:108
Cryptography component definitions.
This interface provides cryptographic signature generation and verification functions.
Definition: p6sign.h:269
This interface provides key metadata infrormation and key access.
Definition: p6cryptokey.h:1198
This interface provides cryptographic signature generation and verification functions.
Definition: p6sign.h:84
uint32_t P6UINT32
Definition: p6types.h:77
#define P6DECLAREICOM
Definition: p6defs.h:191
#define P6PURE
Definition: p6defs.h:192
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
Where to get the data to process, either a file or generic buffer.
Definition: p6crypto.h:36
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
P6UINT32 P6SIGNFLAGS
P6SIGNFLAGS.
Definition: p6sign.h:69
Binary string.
Definition: p6types.h:185
Where to put the data processed, either a file or generic buffer.
Definition: p6crypto.h:54
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188
P6R Cryptographic key interface definitions.