PKIFXSECCryptoKeyRSA.h

Go to the documentation of this file.
00001 
00010 #if !defined(__PKIFXSECCRYPTOKEYRSA_H__)
00011 #define __PKIFXSECCRYPTOKEYRSA_H__
00012 
00013 #include "pkif.h"
00014 #include "PKIFXSECProviderDll.h"
00015 
00016 #include <xsec/enc/XSECCryptoKeyRSA.hpp>
00017 
00018 struct PKIFXSECCryptoKeyRSAImpl;
00019 
00027 class PKIFXML_API PKIFXSECCryptoKeyRSA  : public XSECCryptoKeyRSA
00028 {
00029 
00030 public :
00031 
00032     PKIFXSECCryptoKeyRSA();
00033     virtual ~PKIFXSECCryptoKeyRSA();
00034 
00035     virtual XSECCryptoKey * clone() const;
00036 
00037     virtual void setOAEPparams(unsigned char * params, unsigned int paramsLen);
00038     virtual unsigned int getOAEPparamsLen() const;
00039     virtual const unsigned char * getOAEPparams() const;
00040 
00041     virtual bool verifySHA1PKCS1Base64Signature(const unsigned char * hashBuf, 
00042                                  unsigned int hashLen,
00043                                  const char * base64Signature,
00044                                  unsigned int sigLen,
00045                                  hashMethod hm);
00046 
00047     virtual unsigned int signSHA1PKCS1Base64Signature(unsigned char * hashBuf,
00048         unsigned int hashLen,
00049         char * base64SignatureBuf,
00050         unsigned int base64SignatureBufLen,
00051         hashMethod hm);
00052 
00053     virtual unsigned int privateDecrypt(const unsigned char * inBuf,
00054                                  unsigned char * plainBuf, 
00055                                  unsigned int inLength,
00056                                  unsigned int maxOutLength,
00057                                  PaddingType padding,
00058                                  hashMethod hm);
00059 
00060     virtual unsigned int publicEncrypt(const unsigned char * inBuf,
00061                                  unsigned char * cipherBuf, 
00062                                  unsigned int inLength,
00063                                  unsigned int maxOutLength,
00064                                  PaddingType padding,
00065                                  hashMethod hm);
00066 
00067     
00068     virtual unsigned int getLength() const;
00069 
00070     virtual void SetMediator(IPKIFMediatorPtr & med);
00071     virtual void SetCredential(CPKIFCredentialPtr & cred);
00072     virtual void SetKeyMaterial(CPKIFKeyMaterialPtr & km);
00073 
00074     virtual XSECCryptoKey::KeyType getKeyType() const;
00075 
00076     virtual const XMLCh * getProviderName() const;
00077 
00078 protected:
00079     PKIFXSECCryptoKeyRSAImpl * m_impl;
00080 
00081 public:
00089     virtual void loadPublicModulusBase64BigNums(const char * b64, unsigned int len) {}
00097     virtual void loadPublicExponentBase64BigNums(const char * b64, unsigned int len) {}
00098 
00099 
00100 
00101 };
00102 
00103 
00104 
00105 #endif 
00106 

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