summaryrefslogtreecommitdiff
path: root/cryptopp/crypto/crc.h
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 14:19:43 +0000
committerwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 14:19:43 +0000
commit7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (patch)
treec8585e44049b37e4da152495c954242204c2c38d /cryptopp/crypto/crc.h
parent6f3d69266933ef120d229e0daf2da164b77214d0 (diff)
Project folders rename part 2
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@214 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'cryptopp/crypto/crc.h')
-rw-r--r--cryptopp/crypto/crc.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/cryptopp/crypto/crc.h b/cryptopp/crypto/crc.h
deleted file mode 100644
index ffe90f4..0000000
--- a/cryptopp/crypto/crc.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef CRYPTOPP_CRC32_H
-#define CRYPTOPP_CRC32_H
-
-#include "cryptlib.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-const word32 CRC32_NEGL = 0xffffffffL;
-
-#ifdef IS_LITTLE_ENDIAN
-#define CRC32_INDEX(c) (c & 0xff)
-#define CRC32_SHIFTED(c) (c >> 8)
-#else
-#define CRC32_INDEX(c) (c >> 24)
-#define CRC32_SHIFTED(c) (c << 8)
-#endif
-
-//! CRC Checksum Calculation
-class CRC32 : public HashTransformation
-{
-public:
- CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
- CRC32();
- void Update(const byte *input, size_t length);
- void TruncatedFinal(byte *hash, size_t size);
- unsigned int DigestSize() const {return DIGESTSIZE;}
- std::string AlgorithmName() const {return "CRC32";}
-
- void UpdateByte(byte b) {m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc);}
- byte GetCrcByte(size_t i) const {return ((byte *)&(m_crc))[i];}
-
-private:
- void Reset() {m_crc = CRC32_NEGL;}
-
- static const word32 m_tab[256];
- word32 m_crc;
-};
-
-NAMESPACE_END
-
-#endif