1
#ifndef CRYPTOPP_SHACAL2_H
2
#define CRYPTOPP_SHACAL2_H
10
NAMESPACE_BEGIN(CryptoPP)
13
struct SHACAL2_Info : public FixedBlockSize<32>, public VariableKeyLength<16, 16, 64>
15
static const char *StaticAlgorithmName() {return "SHACAL-2";}
18
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SHACAL-2">SHACAL-2</a>
19
class SHACAL2 : public SHACAL2_Info, public BlockCipherDocumentation
21
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SHACAL2_Info>
24
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
27
FixedSizeSecBlock<word32, 64> m_key;
29
static const word32 K[64];
32
class CRYPTOPP_NO_VTABLE Enc : public Base
35
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
38
class CRYPTOPP_NO_VTABLE Dec : public Base
41
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
45
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
46
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
49
typedef SHACAL2::Encryption SHACAL2Encryption;
50
typedef SHACAL2::Decryption SHACAL2Decryption;