• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 13219613273

08 Feb 2025 08:36PM UTC coverage: 91.657% (+0.003%) from 91.654%
13219613273

push

github

web-flow
Merge pull request #4650 from randombit/jack/header-minimization

Reorganize code and reduce header dependencies

94838 of 103471 relevant lines covered (91.66%)

11212567.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/lib/base/sym_algo.cpp
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
#include <botan/symkey.h>
11

12
namespace Botan {
13

14
void SymmetricAlgorithm::set_key(const OctetString& key) {
9,126✔
15
   set_key(std::span{key.begin(), key.length()});
9,126✔
16
}
9,126✔
17

18
void SymmetricAlgorithm::throw_key_not_set_error() const {
95,910✔
19
   throw Key_Not_Set(name());
191,820✔
20
}
21

22
void SymmetricAlgorithm::set_key(std::span<const uint8_t> key) {
852,642✔
23
   if(!valid_keylength(key.size())) {
852,642✔
24
      throw Invalid_Key_Length(name(), key.size());
×
25
   }
26
   key_schedule(key);
852,642✔
27
}
852,642✔
28

29
}  // namespace Botan
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc