11#include <botan/block_cipher.h>
12#include <botan/hash.h>
13#include <botan/stream_cipher.h>
27 void encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
28 void decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
30 size_t block_size()
const override {
return m_block_size; }
36 void clear()
override;
37 std::string
name()
const override;
38 std::unique_ptr<BlockCipher>
new_object()
const override;
46 Lion(std::unique_ptr<HashFunction> hash, std::unique_ptr<StreamCipher> cipher,
size_t block_size);
49 void key_schedule(std::span<const uint8_t> key)
override;
51 size_t left_size()
const {
return m_hash->output_length(); }
53 size_t right_size()
const {
return m_block_size - left_size(); }
55 const size_t m_block_size;
56 std::unique_ptr<HashFunction> m_hash;
57 std::unique_ptr<StreamCipher> m_cipher;
std::unique_ptr< BlockCipher > new_object() const override
bool has_keying_material() const override
size_t block_size() const override
Lion(std::unique_ptr< HashFunction > hash, std::unique_ptr< StreamCipher > cipher, size_t block_size)
std::string name() const override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Key_Length_Specification key_spec() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
int(* final)(unsigned char *, CTX *)
std::vector< T, secure_allocator< T > > secure_vector