IPKIFCryptoRawOperations Class Reference

#include <IPKIFCryptoRawOperations.h>

Inheritance diagram for IPKIFCryptoRawOperations:

Inheritance graph
[legend]
Collaboration diagram for IPKIFCryptoRawOperations:

Collaboration graph
[legend]

List of all members.


Detailed Description

IPKIFCryptoRawOperations provides means of performing cryptographic operations using raw key material, e.g. non-persistent, plaintext key material. PKIF provides one mediator class and one colleague class that implement this interface: CPKIFCrytpoMediator2 and CPKIFCAPI2.

TSP-enforcing: No

Definition at line 27 of file IPKIFCryptoRawOperations.h.


Public Member Functions

 IPKIFCryptoRawOperations ()
virtual void Sign (const CPKIFKeyMaterial &key, unsigned char *pHashData, int nHashDataLen, unsigned char *pSig, int *pnSigLen, PKIFCRYPTO::HASH_ALG hashAlg)=0
virtual void Encrypt (const CPKIFKeyMaterial &key, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool pad=true)=0
virtual void Decrypt (const CPKIFKeyMaterial &key, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool pad=true)=0
virtual bool Verify (const CPKIFKeyMaterial &key, unsigned char *pHashData, int nHashDataLen, unsigned char *pSig, int nSigLen, PKIFCRYPTO::HASH_ALG hashAlg)=0
virtual IPKIFRawCryptContextCryptInit (const CPKIFKeyMaterial &key, bool pad=true)=0
virtual IPKIFRawCryptContextCryptInit (const CPKIFKeyMaterial *key, bool pad=true)
virtual void Decrypt (IPKIFRawCryptContext *cryptContext, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool final)=0
virtual void Encrypt (IPKIFRawCryptContext *cryptContext, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool final)=0
virtual IPKIFRawCryptContextHMACInit (const CPKIFKeyMaterial &key, PKIFCRYPTO::HASH_ALG ha)=0
virtual void HMACUpdate (IPKIFRawCryptContext *ctx, unsigned char *pData, int nDataLen)=0
virtual void HMACFinal (IPKIFRawCryptContext *ctx, unsigned char *pResult, int *pnResultLen)=0
virtual bool VerifyCertificate (const CPKIFCertificate &issCert, const CPKIFCertificate &subCert)=0

Constructor & Destructor Documentation

IPKIFCryptoRawOperations::IPKIFCryptoRawOperations (  ) 

Interface: External

Default constructor

Returns:
None

Definition at line 17 of file IPKIFCryptoRawOperations.cpp.


Member Function Documentation

virtual void IPKIFCryptoRawOperations::Sign ( const CPKIFKeyMaterial key,
unsigned char *  pHashData,
int  nHashDataLen,
unsigned char *  pSig,
int *  pnSigLen,
PKIFCRYPTO::HASH_ALG  hashAlg 
) [pure virtual]

virtual void IPKIFCryptoRawOperations::Encrypt ( const CPKIFKeyMaterial key,
unsigned char *  pData,
int  nDataLen,
unsigned char *  pResult,
int *  pnResultLen,
bool  pad = true 
) [pure virtual]

virtual void IPKIFCryptoRawOperations::Decrypt ( const CPKIFKeyMaterial key,
unsigned char *  pData,
int  nDataLen,
unsigned char *  pResult,
int *  pnResultLen,
bool  pad = true 
) [pure virtual]

virtual bool IPKIFCryptoRawOperations::Verify ( const CPKIFKeyMaterial key,
unsigned char *  pHashData,
int  nHashDataLen,
unsigned char *  pSig,
int  nSigLen,
PKIFCRYPTO::HASH_ALG  hashAlg 
) [pure virtual]

virtual IPKIFRawCryptContext* IPKIFCryptoRawOperations::CryptInit ( const CPKIFKeyMaterial key,
bool  pad = true 
) [pure virtual]

IPKIFRawCryptContext * IPKIFCryptoRawOperations::CryptInit ( const CPKIFKeyMaterial key,
bool  pad = true 
) [virtual]

Interface: External

This function is used to prepare a crypt context object with presented key material. The crypt context object may then be passed to operations that perform cryptographic operations using the key material. This function is typically used to prepare for operations on large amounts of data. This variant of the function expects a pointer to, rather than a reference to the key material. In the base class, it just dereferences the pointer and calls the other version. Implementations that need the key material object around after the CryptInit() function may store a pointer to key material in the context and require that this overload be used.

Returns:
A poiter to IPKIFRawCryptContext

Definition at line 36 of file IPKIFCryptoRawOperations.cpp.

References CryptInit().

virtual void IPKIFCryptoRawOperations::Decrypt ( IPKIFRawCryptContext cryptContext,
unsigned char *  pData,
int  nDataLen,
unsigned char *  pResult,
int *  pnResultLen,
bool  final 
) [pure virtual]

virtual void IPKIFCryptoRawOperations::Encrypt ( IPKIFRawCryptContext cryptContext,
unsigned char *  pData,
int  nDataLen,
unsigned char *  pResult,
int *  pnResultLen,
bool  final 
) [pure virtual]

virtual IPKIFRawCryptContext* IPKIFCryptoRawOperations::HMACInit ( const CPKIFKeyMaterial key,
PKIFCRYPTO::HASH_ALG  ha 
) [pure virtual]

virtual void IPKIFCryptoRawOperations::HMACUpdate ( IPKIFRawCryptContext ctx,
unsigned char *  pData,
int  nDataLen 
) [pure virtual]

virtual void IPKIFCryptoRawOperations::HMACFinal ( IPKIFRawCryptContext ctx,
unsigned char *  pResult,
int *  pnResultLen 
) [pure virtual]

virtual bool IPKIFCryptoRawOperations::VerifyCertificate ( const CPKIFCertificate issCert,
const CPKIFCertificate subCert 
) [pure virtual]


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:20:57 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6