Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CCryptObject< T, defszStructType > Class Template Reference

A CryptoAPI object wrapper. More...

#include <CryptObjects.h>

List of all members.

Public Member Functions

BOOL DecodeObject (const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwEncodingType=MY_ENCODING_TYPE, LPCSTR szStructType=defszStructType)
 decode an encoded representation of this object. Frees any existing object first.
BOOL EncodeObject (CRYPT_DATA_BLOB *pBlob, DWORD dwEncodingType=MY_ENCODING_TYPE, LPCSTR szStructType=defszStructType)
void FreeObject ()
 free the encapsulated object
DWORD GetObjectSize ()
 Return the size of the encapsulated object.
 operator T * ()
 Extractor for the encapsulated object.
T * operator-> ()
 Extractor for the members of the encapsulated object.
 CCryptObject ()
 Construct an empty object, suitable for DecodeObject usage.
 ~CCryptObject ()
 Tidy up any encapsulated object.

Protected Attributes

DWORD m_objectSize
T * m_object


Detailed Description

template<class T, LPCSTR defszStructType>
class OW32::CCryptObject< T, defszStructType >

A CryptoAPI object wrapper.

Oh dear. Any pointer you pass in as a template argument has to have external linkage. This is sensible, but doesn't sit with those really weird (LPCSTR)2 definitions. So what I do is just pass the pointer in as a DWORD instead. Sigh. You figure out a better way.


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:23 2005 for OW32 by  doxygen 1.3.9.1