summaryrefslogtreecommitdiffstats
path: root/lib/cryptopp/crc.h
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-07 20:12:17 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-07 20:12:17 +0200
commit2e9754ac1cf0537c12ab7974cf55c451c0724540 (patch)
tree713c5b8c8f22f77893b30b9c8cefca4a7c491483 /lib/cryptopp/crc.h
parentFixed merge conflict (diff)
parentFixed some more minor issues with the redstone simulator. (diff)
downloadcuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.gz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.bz2
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.lz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.xz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.zst
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.zip
Diffstat (limited to 'lib/cryptopp/crc.h')
-rw-r--r--lib/cryptopp/crc.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/cryptopp/crc.h b/lib/cryptopp/crc.h
deleted file mode 100644
index f75ea384c..000000000
--- a/lib/cryptopp/crc.h
+++ /dev/null
@@ -1,42 +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;}
- static const char * StaticAlgorithmName() {return "CRC32";}
- std::string AlgorithmName() const {return StaticAlgorithmName();}
-
- 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