8 #ifndef BOTAN_SYMMETRIC_ALGORITHM_H_
9 #define BOTAN_SYMMETRIC_ALGORITHM_H_
11 #include <botan/key_spec.h>
12 #include <botan/symkey.h>
13 #include <botan/types.h>
28 virtual void clear() = 0;
40 return key_spec().maximum_keylength();
48 return key_spec().minimum_keylength();
58 return key_spec().valid_keylength(length);
70 template<
typename Alloc>
71 void set_key(
const std::vector<uint8_t, Alloc>& key)
73 set_key(key.data(), key.size());
81 void set_key(
const uint8_t key[],
size_t length);
86 virtual std::string
name()
const = 0;
92 throw_key_not_set_error();
96 void throw_key_not_set_error()
const;
103 virtual void key_schedule(
const uint8_t key[],
size_t length) = 0;
#define BOTAN_PUBLIC_API(maj, min)
size_t minimum_keylength() const
bool valid_keylength(size_t length) const
void set_key(const SymmetricKey &key)
void set_key(const std::vector< uint8_t, Alloc > &key)
void verify_key_set(bool cond) const
const uint8_t * begin() const
size_t maximum_keylength() const