6
NAMESPACE_BEGIN(CryptoPP)
8
/// <a href="http://www.weidai.com/scan-mirror/md.html#SHA-1">SHA-1</a>
9
class CRYPTOPP_DLL SHA1 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 20, SHA1>
12
static void CRYPTOPP_API InitState(HashWordType *state);
13
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data);
14
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-1";}
17
typedef SHA1 SHA; // for backwards compatibility
19
//! implements the SHA-256 standard
20
class CRYPTOPP_DLL SHA256 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SHA256, 32, true>
23
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
24
size_t HashMultipleBlocks(const word32 *input, size_t length);
26
static void CRYPTOPP_API InitState(HashWordType *state);
27
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data);
28
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-256";}
31
//! implements the SHA-224 standard
32
class CRYPTOPP_DLL SHA224 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SHA224, 28, true>
35
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
36
size_t HashMultipleBlocks(const word32 *input, size_t length);
38
static void CRYPTOPP_API InitState(HashWordType *state);
39
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data) {SHA256::Transform(digest, data);}
40
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-224";}
43
//! implements the SHA-512 standard
44
class CRYPTOPP_DLL SHA512 : public IteratedHashWithStaticTransform<word64, BigEndian, 128, 64, SHA512, 64, CRYPTOPP_BOOL_X86>
47
static void CRYPTOPP_API InitState(HashWordType *state);
48
static void CRYPTOPP_API Transform(word64 *digest, const word64 *data);
49
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-512";}
52
//! implements the SHA-384 standard
53
class CRYPTOPP_DLL SHA384 : public IteratedHashWithStaticTransform<word64, BigEndian, 128, 64, SHA384, 48, CRYPTOPP_BOOL_X86>
56
static void CRYPTOPP_API InitState(HashWordType *state);
57
static void CRYPTOPP_API Transform(word64 *digest, const word64 *data) {SHA512::Transform(digest, data);}
58
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-384";}