Botan 3.6.1
Crypto and TLS for C&
camellia.h
Go to the documentation of this file.
1/*
2* Camellia
3* (C) 2012 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_CAMELLIA_H_
9#define BOTAN_CAMELLIA_H_
10
11#include <botan/block_cipher.h>
12
13namespace Botan {
14
15/**
16* Camellia-128
17*/
19 public:
20 void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
21 void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
22
23 void clear() override;
24
25 std::string name() const override { return "Camellia-128"; }
26
27 std::unique_ptr<BlockCipher> new_object() const override { return std::make_unique<Camellia_128>(); }
28
29 bool has_keying_material() const override;
30
31 private:
32 void key_schedule(std::span<const uint8_t> key) override;
33
35};
36
37/**
38* Camellia-192
39*/
41 public:
42 void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
43 void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
44
45 void clear() override;
46
47 std::string name() const override { return "Camellia-192"; }
48
49 std::unique_ptr<BlockCipher> new_object() const override { return std::make_unique<Camellia_192>(); }
50
51 bool has_keying_material() const override;
52
53 private:
54 void key_schedule(std::span<const uint8_t> key) override;
55
57};
58
59/**
60* Camellia-256
61*/
63 public:
64 void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
65 void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
66
67 void clear() override;
68
69 std::string name() const override { return "Camellia-256"; }
70
71 std::unique_ptr<BlockCipher> new_object() const override { return std::make_unique<Camellia_256>(); }
72
73 bool has_keying_material() const override;
74
75 private:
76 void key_schedule(std::span<const uint8_t> key) override;
77
79};
80
81} // namespace Botan
82
83#endif
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Definition camellia.cpp:367
void clear() override
Definition camellia.cpp:406
bool has_keying_material() const override
Definition camellia.cpp:382
std::unique_ptr< BlockCipher > new_object() const override
Definition camellia.h:27
std::string name() const override
Definition camellia.h:25
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Definition camellia.cpp:352
std::unique_ptr< BlockCipher > new_object() const override
Definition camellia.h:49
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Definition camellia.cpp:357
bool has_keying_material() const override
Definition camellia.cpp:386
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Definition camellia.cpp:372
void clear() override
Definition camellia.cpp:410
std::string name() const override
Definition camellia.h:47
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Definition camellia.cpp:377
bool has_keying_material() const override
Definition camellia.cpp:390
std::unique_ptr< BlockCipher > new_object() const override
Definition camellia.h:71
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
Definition camellia.cpp:362
void clear() override
Definition camellia.cpp:414
std::string name() const override
Definition camellia.h:69
int(* final)(unsigned char *, CTX *)
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:61