Security Scol plugin
sm3.h
Go to the documentation of this file.
1// sm3.h - written and placed in the public domain by Jeffrey Walton and Han Lulu
2// Based on the specification provided by Sean Shen and Xiaodong Lee.
3// Based on code by Krzysztof Kwiatkowski and Jack Lloyd.
4// Also see https://tools.ietf.org/html/draft-shen-sm3-hash.
5
13
14#ifndef CRYPTOPP_SM3_H
15#define CRYPTOPP_SM3_H
16
17#include "config.h"
18#include "iterhash.h"
19
20NAMESPACE_BEGIN(CryptoPP)
21
22
27class SM3 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SM3, 32, true>
28{
29public:
37 static void InitState(HashWordType *state);
38
49 static void Transform(HashWordType *digest, const HashWordType *data);
50
53 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() { return "SM3"; }
54
55protected:
56 size_t HashMultipleBlocks(const HashWordType *input, size_t length);
57};
58
59NAMESPACE_END
60
61#endif // CRYPTOPP_SM3_H
Iterated hash with a static transformation function.
Definition iterhash.h:182
SM3 hash function.
Definition sm3.h:28
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
The algorithm name.
Definition sm3.h:53
Library configuration file.
unsigned int word32
32-bit unsigned datatype
Definition config_int.h:62
Base classes for iterated hashes.
Converts an enumeration to a type suitable for use as a template parameter.
Definition cryptlib.h:136