monotone

monotone Mtn Source Tree

Root/botan/arc4.h

1/*************************************************
2* ARC4 Header File *
3* (C) 1999-2005 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 const u32bit SKIP;
29 SecureBuffer<byte, 1024> buffer;
30 SecureBuffer<u32bit, 256> state;
31 u32bit X, Y, position;
32 };
33
34}
35
36#endif

Archive Download this file

Branches

Tags

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