diff options
author | Malfurious <m@lfurio.us> | 2024-10-21 11:09:00 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-10-24 06:41:41 -0400 |
commit | 5494fc310acf0aabb9d828451331e44483eb21c7 (patch) | |
tree | 77280a586d52470fca89b9ed73f5f1faaf7907c6 /cryptopp562/crc.h | |
parent | 428471d39fb8c205a9fad899c88c30a2cb7df685 (diff) | |
download | compass-5494fc310acf0aabb9d828451331e44483eb21c7.tar.gz compass-5494fc310acf0aabb9d828451331e44483eb21c7.zip |
Remove Crypto++ library
The tracked version of Crypto++ is going on 10 years old and doesn't
always compile properly on modern tooling.
This removes the entire subdirectory as well as references to files in
the build script. Due to the number of files touched by this commit, I
opt to add its replacement in the next commit.
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'cryptopp562/crc.h')
-rw-r--r-- | cryptopp562/crc.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/cryptopp562/crc.h b/cryptopp562/crc.h deleted file mode 100644 index f75ea38..0000000 --- a/cryptopp562/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 |