monotone

monotone Mtn Source Tree

Root/botan/arc4.h

1/*************************************************
2* ARC4 Header File *
3* (C) 1999-2008 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_ARC4_H__
7#define BOTAN_ARC4_H__
8
9#include <botan/base.h>
10
11namespace Botan {
12
13/*************************************************
14* ARC4 *
15*************************************************/
16class ARC4 : public StreamCipher
17 {
18 public:
19 void clear() throw();
20 std::string name() const;
21 StreamCipher* clone() const { return new ARC4(SKIP); }
22 ARC4(u32bit = 0);
23 ~ARC4() { clear(); }
24 private:
25 void cipher(const byte[], byte[], u32bit);
26 void key(const byte[], u32bit);
27 void generate();
28
29 const u32bit SKIP;
30
31 SecureBuffer<byte, DEFAULT_BUFFERSIZE> buffer;
32 SecureBuffer<u32bit, 256> state;
33 u32bit X, Y, position;
34 };
35
36}
37
38#endif

Archive Download this file

Branches

Tags

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