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

randombit / botan / 13214733615

08 Feb 2025 10:21AM UTC coverage: 91.652% (-0.006%) from 91.658%
13214733615

Pull #4650

github

web-flow
Merge b4f174ab4 into 801a4b3ec
Pull Request #4650: Reorganize code and reduce header dependencies

94836 of 103474 relevant lines covered (91.65%)

11140650.22 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/symkey.h>
10
#include <botan/exceptn.h>
11

12
namespace Botan {
13

14
void SymmetricAlgorithm::set_key(const OctetString& key) {
9,134✔
15
   set_key(std::span{key.begin(), key.length()});
9,134✔
16
}
9,134✔
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) {
853,635✔
23
   if(!valid_keylength(key.size())) {
853,635✔
24
      throw Invalid_Key_Length(name(), key.size());
×
25
   }
26
   key_schedule(key);
853,635✔
27
}
853,635✔
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