monotone

monotone Mtn Source Tree

Root/botan/ecb.h

1/*************************************************
2* ECB Mode Header File *
3* (C) 1999-2006 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_ECB_H__
7#define BOTAN_ECB_H__
8
9#include <botan/modebase.h>
10#include <botan/mode_pad.h>
11
12namespace Botan {
13
14/*************************************************
15* ECB *
16*************************************************/
17class ECB : public BlockCipherMode
18 {
19 protected:
20 ECB(const std::string&, const std::string&);
21 std::string name() const;
22 const BlockCipherModePaddingMethod* padder;
23 private:
24 bool valid_iv_size(u32bit) const;
25 };
26
27/*************************************************
28* ECB Encryption *
29*************************************************/
30class ECB_Encryption : public ECB
31 {
32 public:
33 ECB_Encryption(const std::string&, const std::string&);
34 ECB_Encryption(const std::string&, const std::string&,
35 const SymmetricKey&);
36 private:
37 void write(const byte[], u32bit);
38 void end_msg();
39 };
40
41/*************************************************
42* ECB Decryption *
43*************************************************/
44class ECB_Decryption : public ECB
45 {
46 public:
47 ECB_Decryption(const std::string&, const std::string&);
48 ECB_Decryption(const std::string&, const std::string&,
49 const SymmetricKey&);
50 private:
51 void write(const byte[], u32bit);
52 void end_msg();
53 };
54
55}
56
57#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status