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

Botan 1.10.17

mars.h
Go to the documentation of this file.
1 /*
2 * MARS
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_MARS_H__
9 #define BOTAN_MARS_H__
10
11 #include <botan/block_cipher.h>
12
13 namespace Botan {
14
15 /**
16 * MARS, IBM's candidate for AES
17 */
18 class BOTAN_DLL MARS : public Block_Cipher_Fixed_Params<16, 16, 32, 4>
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(EK); }
25 std::string name() const { return "MARS"; }
26 BlockCipher* clone() const { return new MARS; }
27
28 MARS() : EK(40) {}
29 private:
30 void key_schedule(const byte[], size_t);
31
32 SecureVector<u32bit> EK;
33 };
34
35 }
36
37 #endif
Botan::MARS::clear
void clear()
Definition: mars.h:24
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::MARS::clone
BlockCipher * clone() const
Definition: mars.h:26
Botan
Definition: algo_base.h:14
Botan::MARS
Definition: mars.h:18
Botan::MARS::MARS
MARS()
Definition: mars.h:28
Botan::MARS::name
std::string name() const
Definition: mars.h:25
Botan::SecureVector< u32bit >
Botan::Block_Cipher_Fixed_Params
Definition: block_cipher.h:104
Botan::zeroise
void zeroise(MemoryRegion< T > &vec)
Definition: secmem.h:428
Botan::BlockCipher
Definition: block_cipher.h:18