summaryrefslogtreecommitdiffstats
path: root/cryptopp562/sha3.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/sha3.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 'cryptopp562/sha3.h')
-rw-r--r--cryptopp562/sha3.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/cryptopp562/sha3.h b/cryptopp562/sha3.h
deleted file mode 100644
index 232bae5..0000000
--- a/cryptopp562/sha3.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// sha3.h - written and placed in the public domain by Wei Dai
-
-#ifndef CRYPTOPP_SHA3_H
-#define CRYPTOPP_SHA3_H
-
-#include "cryptlib.h"
-#include "secblock.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-/// <a href="http://en.wikipedia.org/wiki/SHA-3">SHA-3</a>
-class SHA3 : public HashTransformation
-{
-public:
- SHA3(unsigned int digestSize) : m_digestSize(digestSize) {Restart();}
- unsigned int DigestSize() const {return m_digestSize;}
- std::string AlgorithmName() const {return "SHA-3-" + IntToString(m_digestSize*8);}
- unsigned int OptimalDataAlignment() const {return GetAlignmentOf<word64>();}
-
- void Update(const byte *input, size_t length);
- void Restart();
- void TruncatedFinal(byte *hash, size_t size);
-
-protected:
- inline unsigned int r() const {return 200 - 2 * m_digestSize;}
-
- FixedSizeSecBlock<word64, 25> m_state;
- unsigned int m_digestSize, m_counter;
-};
-
-class SHA3_224 : public SHA3
-{
-public:
- CRYPTOPP_CONSTANT(DIGESTSIZE = 28)
- SHA3_224() : SHA3(DIGESTSIZE) {}
- static const char * StaticAlgorithmName() {return "SHA-3-224";}
-};
-
-class SHA3_256 : public SHA3
-{
-public:
- CRYPTOPP_CONSTANT(DIGESTSIZE = 32)
- SHA3_256() : SHA3(DIGESTSIZE) {}
- static const char * StaticAlgorithmName() {return "SHA-3-256";}
-};
-
-class SHA3_384 : public SHA3
-{
-public:
- CRYPTOPP_CONSTANT(DIGESTSIZE = 48)
- SHA3_384() : SHA3(DIGESTSIZE) {}
- static const char * StaticAlgorithmName() {return "SHA-3-384";}
-};
-
-class SHA3_512 : public SHA3
-{
-public:
- CRYPTOPP_CONSTANT(DIGESTSIZE = 64)
- SHA3_512() : SHA3(DIGESTSIZE) {}
- static const char * StaticAlgorithmName() {return "SHA-3-512";}
-};
-
-NAMESPACE_END
-
-#endif