00001 00010 #ifndef __PKIFCRYPTOPPRAWONTEXT_H__ 00011 #define __PKIFCRYPTOPPRAWONTEXT_H__ 00012 00013 #include "PKIFdll.h" 00014 #include "IPKIFRawCryptContext.h" 00015 #include "IPKIFCryptContext.h" 00016 #include "IPKIFHashContext.h" 00017 #include "PKIFCryptoConstants.h" 00018 00019 #include "cryptlib.h" 00020 00021 00022 class CPKIFKeyMaterial; 00023 00035 class CPKIFCryptoPPRawContext : 00036 public IPKIFRawCryptContext, public IPKIFHashContext 00037 { 00038 friend class CPKIFCryptoPPRaw; 00039 public: 00040 virtual ~CPKIFCryptoPPRawContext(void); 00041 00042 private: 00044 CPKIFCryptoPPRawContext& operator=(const CPKIFCryptoPPRawContext& rhs); 00046 CPKIFCryptoPPRawContext(void); //disallow creation except by friend class 00047 void clear(void); 00048 00049 // true if PKIF will be performing the padding 00050 bool m_bNeedsPad; 00051 // size of a cipher block for this context 00052 int m_blocksize; 00053 00054 // crypto++ context 00055 CryptoPP::BufferedTransformation * m_ctx; 00056 CryptoPP::HashTransformation * m_hashCtx; 00057 int m_keyLen; 00058 unsigned char * m_rawKey; 00059 int m_ivLen; 00060 unsigned char * m_iv; 00061 PKIFCRYPTO::SYMKEY_ALG m_keyAlgorithm; 00062 PKIFCRYPTO::SYMKEY_MODE m_keyMode; 00063 }; 00064 00065 #endif