summaryrefslogtreecommitdiffstats
path: root/cryptopp562/trunhash.h
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-10-21 11:09:00 -0400
committerMalfurious <m@lfurio.us>2024-10-24 06:41:41 -0400
commit5494fc310acf0aabb9d828451331e44483eb21c7 (patch)
tree77280a586d52470fca89b9ed73f5f1faaf7907c6 /cryptopp562/trunhash.h
parent428471d39fb8c205a9fad899c88c30a2cb7df685 (diff)
downloadcompass-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 '')
-rw-r--r--cryptopp562/trunhash.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/cryptopp562/trunhash.h b/cryptopp562/trunhash.h
deleted file mode 100644
index c1c4e9b..0000000
--- a/cryptopp562/trunhash.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef CRYPTOPP_TRUNHASH_H
-#define CRYPTOPP_TRUNHASH_H
-
-#include "cryptlib.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-class NullHash : public HashTransformation
-{
-public:
- void Update(const byte *input, size_t length) {}
- unsigned int DigestSize() const {return 0;}
- void TruncatedFinal(byte *digest, size_t digestSize) {}
- bool TruncatedVerify(const byte *digest, size_t digestLength) {return true;}
-};
-
-//! construct new HashModule with smaller DigestSize() from existing one
-template <class T>
-class TruncatedHashTemplate : public HashTransformation
-{
-public:
- TruncatedHashTemplate(T hm, unsigned int digestSize)
- : m_hm(hm), m_digestSize(digestSize) {}
- TruncatedHashTemplate(const byte *key, size_t keyLength, unsigned int digestSize)
- : m_hm(key, keyLength), m_digestSize(digestSize) {}
- TruncatedHashTemplate(size_t digestSize)
- : m_digestSize(digestSize) {}
-
- void Restart()
- {m_hm.Restart();}
- void Update(const byte *input, size_t length)
- {m_hm.Update(input, length);}
- unsigned int DigestSize() const {return m_digestSize;}
- void TruncatedFinal(byte *digest, size_t digestSize)
- {m_hm.TruncatedFinal(digest, digestSize);}
- bool TruncatedVerify(const byte *digest, size_t digestLength)
- {return m_hm.TruncatedVerify(digest, digestLength);}
-
-private:
- T m_hm;
- unsigned int m_digestSize;
-};
-
-typedef TruncatedHashTemplate<HashTransformation &> TruncatedHashModule;
-
-NAMESPACE_END
-
-#endif