Crypto++  8.8
Free C++ class library of cryptographic schemes
whrlpool.h
Go to the documentation of this file.
1 // whrlpool.h - originally modified by Kevin Springle from Paulo Barreto and Vincent Rijmen's
2 // public domain code, whirlpool.c. Updated to Whirlpool version 3.0, optimized
3 // and SSE version added by WD. All modifications are placed in the public domain.
4 
5 #ifndef CRYPTOPP_WHIRLPOOL_H
6 #define CRYPTOPP_WHIRLPOOL_H
7 
8 /// \file whrlpool.h
9 /// \brief Classes for the Whirlpool message digest
10 /// \details Crypto++ provides version 3.0 of the Whirlpool algorithm.
11 /// This version of the algorithm was submitted for ISO standardization.
12 
13 #include "config.h"
14 #include "iterhash.h"
15 
16 // Clang 3.3 integrated assembler crash on Linux. Clang 3.4 due to compiler
17 // error with .intel_syntax, http://llvm.org/bugs/show_bug.cgi?id=24232
18 #if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_MIXED_ASM)
19 # define CRYPTOPP_DISABLE_WHIRLPOOL_ASM 1
20 #endif
21 
22 NAMESPACE_BEGIN(CryptoPP)
23 
24 /// \brief Whirlpool message digest
25 /// \details Crypto++ provides version 3.0 of the Whirlpool algorithm.
26 /// This version of the algorithm was submitted for ISO standardization.
27 /// \since Crypto++ 5.2
28 /// \sa <a href="http://www.cryptopp.com/wiki/Whirlpool">Whirlpool</a>
30 {
31 public:
32  CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Whirlpool";}
33  std::string AlgorithmProvider() const;
34 
35  static void InitState(HashWordType *state);
36  static void Transform(word64 *digest, const word64 *data);
37  void TruncatedFinal(byte *hash, size_t size);
38 };
39 
40 NAMESPACE_END
41 
42 #endif
Iterated hash with a static transformation function.
Definition: iterhash.h:182
Whirlpool message digest.
Definition: whrlpool.h:30
Library configuration file.
unsigned long long word64
64-bit unsigned datatype
Definition: config_int.h:101
Base classes for iterated hashes.
Crypto++ library namespace.
Converts an enumeration to a type suitable for use as a template parameter.
Definition: cryptlib.h:141