PKIFXSECCryptoKeyHMAC.cpp

Go to the documentation of this file.
00001 
00010 #include "PKIFXSECCryptoKeyHMAC.h"
00011 #include "PKIFXSECCryptoKeyRaw.h"
00012 
00020 PKIFXSECCryptoKeyHMAC::PKIFXSECCryptoKeyHMAC()
00021 :m_rawKey(new PKIFXSECCryptoKeyRaw())
00022 {
00023 }
00024 
00032 PKIFXSECCryptoKeyHMAC::PKIFXSECCryptoKeyHMAC(CPKIFKeyMaterialPtr & km)
00033 :m_rawKey(new PKIFXSECCryptoKeyRaw(km))
00034 {
00035 }
00036 
00044 PKIFXSECCryptoKeyHMAC::~PKIFXSECCryptoKeyHMAC()
00045 {
00046     if(m_rawKey) {
00047         delete m_rawKey;
00048         m_rawKey = 0;
00049     }
00050 }
00051 
00059 XSECCryptoKey * PKIFXSECCryptoKeyHMAC::clone() const
00060 {
00061     CPKIFKeyMaterialPtr kp = m_rawKey->getPKIFKeyMaterial();
00062     PKIFXSECCryptoKeyHMAC * rv = new PKIFXSECCryptoKeyHMAC(kp);
00063     return rv;
00064 }
00065 
00073 void PKIFXSECCryptoKeyHMAC::setKey(
00075     unsigned char * inBuf,
00077     unsigned int inLength)
00078 {
00079     m_rawKey->setKey(inBuf,inLength);
00080 }
00081 
00089 unsigned int PKIFXSECCryptoKeyHMAC::getKey(
00091     safeBuffer &outBuf) const
00092 {
00093     return m_rawKey->getKey(outBuf);
00094 }
00095 
00103 CPKIFKeyMaterialPtr PKIFXSECCryptoKeyHMAC::getPKIFKeyMaterial()
00104 {
00105     return m_rawKey->getPKIFKeyMaterial();
00106 }
00107 
00115 void PKIFXSECCryptoKeyHMAC::setPKIFKeyMaterial(
00117     CPKIFKeyMaterialPtr & km)
00118 {
00119     m_rawKey->setPKIFKeyMaterial(km);
00120 }
00121 
00130 const XMLCh * PKIFXSECCryptoKeyHMAC::getProviderName() const
00131 {
00132     return m_rawKey->getProviderName();
00133 }
00134 

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