Botan
3.6.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
base
sym_algo.cpp
Go to the documentation of this file.
1
/*
2
* (C) 2018 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6
7
#include <botan/sym_algo.h>
8
9
#include <botan/exceptn.h>
10
11
namespace
Botan
{
12
13
void
SymmetricAlgorithm::throw_key_not_set_error()
const
{
14
throw
Key_Not_Set(
name
());
15
}
16
17
void
SymmetricAlgorithm::set_key
(std::span<const uint8_t> key) {
18
if
(!
valid_keylength
(key.size())) {
19
throw
Invalid_Key_Length
(
name
(), key.size());
20
}
21
key_schedule(key);
22
}
17
void
SymmetricAlgorithm::set_key
(std::span<const uint8_t> key) {
…
}
23
24
}
// namespace Botan
Botan::Invalid_Key_Length
Definition
exceptn.h:153
Botan::SymmetricAlgorithm::valid_keylength
bool valid_keylength(size_t length) const
Definition
sym_algo.h:107
Botan::SymmetricAlgorithm::set_key
void set_key(const SymmetricKey &key)
Definition
sym_algo.h:113
Botan::SymmetricAlgorithm::name
virtual std::string name() const =0
Botan
Definition
alg_id.cpp:13
Generated by
1.12.0