monotone

monotone Mtn Source Tree

Root/botan/cbc.h

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

Archive Download this file

Branches

Tags

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