aboutsummaryrefslogtreecommitdiffstats
path: root/include/cfb.h
blob: bbecd63ece1d631064864d074f5003cd59aa2af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*************************************************
* CFB Mode Header File                           *
* (C) 1999-2006 The Botan Project                *
*************************************************/

#ifndef BOTAN_CFB_H__
#define BOTAN_CFB_H__

#include <botan/modebase.h>

namespace Botan {

/*************************************************
* CFB Encryption                                 *
*************************************************/
class CFB_Encryption : public BlockCipherMode
   {
   public:
      CFB_Encryption(const std::string&, u32bit = 0);
      CFB_Encryption(const std::string&, const SymmetricKey&,
                     const InitializationVector&, u32bit = 0);
   private:
      void write(const byte[], u32bit);
      void feedback();
      const u32bit FEEDBACK_SIZE;
   };

/*************************************************
* CFB Decryption                                 *
*************************************************/
class CFB_Decryption : public BlockCipherMode
   {
   public:
      CFB_Decryption(const std::string&, u32bit = 0);
      CFB_Decryption(const std::string&, const SymmetricKey&,
                     const InitializationVector&, u32bit = 0);
   private:
      void write(const byte[], u32bit);
      void feedback();
      const u32bit FEEDBACK_SIZE;
   };

}

#endif