Fabcoin Core  0.16.2
P2P Digital Currency
md2.h
Go to the documentation of this file.
1 #ifndef CRYPTOPP_MD2_H
2 #define CRYPTOPP_MD2_H
3 
4 #include "cryptlib.h"
5 #include "secblock.h"
6 
8 
9 namespace Weak1 {
10 
12 class MD2 : public HashTransformation
13 {
14 public:
15  MD2();
16  void Update(const byte *input, size_t length);
17  void TruncatedFinal(byte *hash, size_t size);
18  unsigned int DigestSize() const {return DIGESTSIZE;}
19  unsigned int BlockSize() const {return BLOCKSIZE;}
20  CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "MD2";}
21 
22  CRYPTOPP_CONSTANT(DIGESTSIZE = 16)
23  CRYPTOPP_CONSTANT(BLOCKSIZE = 16)
24 
25 private:
26  void Transform();
27  void Init();
28  SecByteBlock m_X, m_C, m_buf;
29  unsigned int m_count;
30 };
31 
32 }
33 #if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1
34 namespace Weak {using namespace Weak1;} // import Weak1 into CryptoPP::Weak
35 #else
36 using namespace Weak1; // import Weak1 into CryptoPP with warning
37 #ifdef __GNUC__
38 #warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning."
39 #else
40 #pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning.")
41 #endif
42 #endif
43 
45 
46 #endif
uint8_t byte
Definition: Common.h:57
#define CRYPTOPP_STATIC_CONSTEXPR
Definition: config.h:892
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
MD2
Definition: md2.h:12
unsigned int BlockSize() const
Provides the block size of the compression function.
Definition: md2.h:19
Abstract base classes that provide a uniform interface to this library.
unsigned int DigestSize() const
Provides the digest size of the hash.
Definition: md2.h:18
unsigned int m_count
Definition: md2.h:29
SecByteBlock m_X
Definition: md2.h:28
Classes and functions for secure memory allocations.
#define CRYPTOPP_CONSTANT(x)
Definition: config.h:540
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
Definition: md2.h:20
uint8_t const size_t const size
Definition: sha3.h:20
Interface for hash functions and data processing part of MACs.
Definition: cryptlib.h:930
#define NAMESPACE_END
Definition: config.h:201
Definition: arc4.cpp:14
Definition: panama.cpp:423