Crypto++
blowfish.h
Go to the documentation of this file.
1 #ifndef CRYPTOPP_BLOWFISH_H
2 #define CRYPTOPP_BLOWFISH_H
3 
4 /** \file */
5 
6 #include "seckey.h"
7 #include "secblock.h"
8 
9 NAMESPACE_BEGIN(CryptoPP)
10 
11 //! _
12 struct Blowfish_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 56>, public FixedRounds<16>
13 {
14  static const char *StaticAlgorithmName() {return "Blowfish";}
15 };
16 
17 //! <a href="http://www.weidai.com/scan-mirror/cs.html#Blowfish">Blowfish</a>
19 {
20  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Blowfish_Info>
21  {
22  public:
23  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
24  void UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs &params);
25 
26  private:
27  void crypt_block(const word32 in[2], word32 out[2]) const;
28 
29  static const word32 p_init[ROUNDS+2];
30  static const word32 s_init[4*256];
31 
34  };
35 
36 public:
39 };
40 
43 
44 NAMESPACE_END
45 
46 #endif
These objects usually should not be used directly. See CipherModeDocumentation instead.
Definition: seckey.h:188
Blowfish
Definition: blowfish.h:18
to be inherited by block ciphers with fixed block size
Definition: seckey.h:21
to be inherited by ciphers with fixed number of rounds
Definition: seckey.h:31
support query of variable key length, template parameters are default, min, max, multiple (default mu...
Definition: seckey.h:80
interface for retrieving values given their names
Definition: cryptlib.h:224