Crypto++
3way.h
Go to the documentation of this file.
1 #ifndef CRYPTOPP_THREEWAY_H
2 #define CRYPTOPP_THREEWAY_H
3 
4 /** \file
5 */
6 
7 #include "seckey.h"
8 #include "secblock.h"
9 
10 NAMESPACE_BEGIN(CryptoPP)
11 
12 //! _
13 struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
14 {
15  static const char *StaticAlgorithmName() {return "3-Way";}
16 };
17 
18 /// <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
20 {
21  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
22  {
23  public:
24  void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
25 
26  protected:
27  unsigned int m_rounds;
29  };
30 
31  class CRYPTOPP_NO_VTABLE Enc : public Base
32  {
33  public:
34  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
35  };
36 
37  class CRYPTOPP_NO_VTABLE Dec : public Base
38  {
39  public:
40  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
41  };
42 
43 public:
46 };
47 
50 
51 NAMESPACE_END
52 
53 #endif