Botan: src/block/tea/tea.h Source File

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

tea.h
Go to the documentation of this file.
1 /*
2 * TEA
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_TEA_H__
9 #define BOTAN_TEA_H__
10
11 #include <botan/block_cipher.h>
12
13 namespace Botan {
14
15 /**
16 * TEA
17 */
18 class BOTAN_DLL TEA : public Block_Cipher_Fixed_Params<8, 16>
19 {
20 public:
21 void encrypt_n(const byte in[], byte out[], size_t blocks) const;
22 void decrypt_n(const byte in[], byte out[], size_t blocks) const;
23
24 void clear() { zeroise(K); }
25 std::string name() const { return "TEA"; }
26 BlockCipher* clone() const { return new TEA; }
27
28 TEA() : K(4) {}
29 private:
30 void key_schedule(const byte[], size_t);
31 SecureVector<u32bit> K;
32 };
33
34 }
35
36 #endif
Botan::TEA::name
std::string name() const
Definition: tea.h:25
Botan::TEA::clear
void clear()
Definition: tea.h:24
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::TEA::clone
BlockCipher * clone() const
Definition: tea.h:26
Botan::TEA
Definition: tea.h:18
Botan
Definition: algo_base.h:14
Botan::TEA::TEA
TEA()
Definition: tea.h:28
Botan::SecureVector< u32bit >
Botan::Block_Cipher_Fixed_Params
Definition: block_cipher.h:104
Botan::zeroise
void zeroise(MemoryRegion< T > &vec)
Definition: secmem.h:415
Botan::BlockCipher
Definition: block_cipher.h:18