From 2d8e4680855691657cb8029ae5cb05c67c6dc654 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 8 Apr 2021 07:53:41 -0400 Subject: [PATCH] Fix MD2 AlgorithmName --- md2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/md2.h b/md2.h index 3b8d3ef3..5c5c64e7 100644 --- a/md2.h +++ b/md2.h @@ -20,12 +20,14 @@ namespace Weak1 { class MD2 : public HashTransformation { public: + CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "MD2";} + MD2(); void Update(const byte *input, size_t length); void TruncatedFinal(byte *hash, size_t size); unsigned int DigestSize() const {return DIGESTSIZE;} unsigned int BlockSize() const {return BLOCKSIZE;} - CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "MD2";} + std::string AlgorithmName() const {return StaticAlgorithmName();} CRYPTOPP_CONSTANT(DIGESTSIZE = 16); CRYPTOPP_CONSTANT(BLOCKSIZE = 16);