PKIFAlgorithm.h

Go to the documentation of this file.
00001 
00009 #if !defined(__PKIFALGORITHM_H__)
00010 #define __PKIFALGORITHM_H__
00011 
00012 #include "PKIFdll.h"
00013 
00014 #include "PKIFCryptoConstants.h"
00015 
00016 FD_SMART_PTR(CPKIFOID);
00017 
00018 struct PKIFAlgorithmImpl;
00024 class CAC_API CPKIFAlgorithm
00025 {
00026 public:
00027     CPKIFAlgorithm(const std::string & description, PKIFCRYPTO::HASH_ALG alg, int digestsize);
00028     CPKIFAlgorithm(const std::string & description, PKIFCRYPTO::SYMKEY_ALG alg, PKIFCRYPTO::SYMKEY_MODE mode, int keylen, int blocksize);
00029     CPKIFAlgorithm(const std::string & description, PKIFCRYPTO::ASYMKEY_ALG alg);
00030     CPKIFAlgorithm(const std::string & description, PKIFCRYPTO::ASYMKEY_ALG ka, PKIFCRYPTO::HASH_ALG ha);
00031     CPKIFAlgorithm(void);
00032     ~CPKIFAlgorithm(void);
00033 
00034     static CPKIFAlgorithm * GetAlg(PKIFCRYPTO::HASH_ALG alg);
00035     static CPKIFAlgorithm * GetAlg(PKIFCRYPTO::SYMKEY_ALG alg, PKIFCRYPTO::SYMKEY_MODE mode = PKIFCRYPTO::ECB);
00036     static CPKIFAlgorithm * GetAlg(PKIFCRYPTO::ASYMKEY_ALG alg);
00037     static CPKIFAlgorithm * GetAlg(CPKIFOIDPtr oid);
00038     static void init(void);
00039 
00040     const std::string & Description(void) const;
00041     int BlockSize(void) const;
00042     int DigestSize(void) const;
00043     int KeySize(void) const;
00044     bool NeedsIV(void) const;
00045     PKIFCRYPTO::HASH_ALG HashAlg(void) const;
00046     PKIFCRYPTO::SYMKEY_ALG SymkeyAlg(void) const;
00047     PKIFCRYPTO::SYMKEY_MODE SymkeyMode(void) const;
00048     PKIFCRYPTO::ASYMKEY_ALG AsymkeyAlg(void) const;
00049 
00050     CPKIFOIDPtr OID(void) const;
00051 
00052 private:
00053 
00055     CPKIFAlgorithm(const CPKIFAlgorithm & rhs);
00057     CPKIFAlgorithm & operator=(const CPKIFAlgorithm & rhs);
00058 
00059     PKIFAlgorithmImpl * m_impl;
00060 };
00061 
00062 
00063 #endif 

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