Coverage Report

Created: 2024-02-25 06:16

/src/botan/src/lib/base/sym_algo.cpp
Line
Count
Source (jump to first uncovered line)
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
0
void SymmetricAlgorithm::throw_key_not_set_error() const {
14
0
   throw Key_Not_Set(name());
15
0
}
16
17
6.75M
void SymmetricAlgorithm::set_key(std::span<const uint8_t> key) {
18
6.75M
   if(!valid_keylength(key.size())) {
19
2.23k
      throw Invalid_Key_Length(name(), key.size());
20
2.23k
   }
21
6.74M
   key_schedule(key);
22
6.74M
}
23
24
}  // namespace Botan