PKIFCryptoPPExternalDigest.h

Go to the documentation of this file.
00001 
00010 #ifndef __PKIFCRYPTOPPEXTERNALDIGEST_H__
00011 #define __PKIFCRYPTOPPEXTERNALDIGEST_H__
00012 
00013 #include "PKIFdll.h"
00014 #include "cryptlib.h"
00015 #include "pubkey.h"
00016 
00026 class PKIFCryptoPPExternalDigest : public CryptoPP::HashTransformation
00027 {
00028 public:
00029 
00037     PKIFCryptoPPExternalDigest() : m_digestBuf(0),m_digestSize(0) {}
00038     ~PKIFCryptoPPExternalDigest();
00039 
00040     void SetDigest(const unsigned char * buf, unsigned int length);
00041 
00042     // XXX Revisit: Should this throw if it's called?
00051     void Update(const byte * input, size_t length) {}
00052     unsigned int DigestSize() const;
00053     void TruncatedFinal(byte * digest, size_t digestSize);
00054     bool TruncatedVerify(const byte * digest, size_t digestLength);
00055 
00056 private:
00057     unsigned int m_digestSize;
00058     unsigned char * m_digestBuf;
00059 };
00060 
00061 
00063 typedef CryptoPP::PK_MessageAccumulatorImpl<PKIFCryptoPPExternalDigest> PKIFCryptoPPExternalDigestAccumulator;
00064 
00065 PKIFCryptoPPExternalDigestAccumulator * NewEDAccumulator( unsigned char * digest, size_t len);
00066 
00067 
00068 #endif

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