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

randombit / botan / 23225340130

18 Mar 2026 01:53AM UTC coverage: 89.677% (-0.001%) from 89.678%
23225340130

push

github

web-flow
Merge pull request #5456 from randombit/jack/clang-tidy-22

Fix various warnings from clang-tidy 22

104438 of 116460 relevant lines covered (89.68%)

11819947.55 hits per line

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

92.86
/src/tests/test_blowfish.cpp
1
/*
2
* (C) 2018 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6

7
#include "tests.h"
8

9
#if defined(BOTAN_HAS_BLOWFISH)
10

11
   #include <botan/internal/blowfish.h>
12

13
namespace Botan_Tests {
14

15
namespace {
16

17
class Blowfish_Salted_Tests final : public Text_Based_Test {
×
18
   public:
19
      Blowfish_Salted_Tests() : Text_Based_Test("salted_blowfish.vec", "Key,Salt,Out") {}
2✔
20

21
      Test::Result run_one_test(const std::string& /*header*/, const VarMap& vars) override {
11✔
22
         Test::Result result("Blowfish salted key schedule");
11✔
23

24
         const std::vector<uint8_t> key = vars.get_req_bin("Key");
11✔
25
         const std::vector<uint8_t> salt = vars.get_req_bin("Salt");
11✔
26
         const std::vector<uint8_t> expected = vars.get_req_bin("Out");
11✔
27

28
         Botan::Blowfish blowfish;
11✔
29

30
         blowfish.salted_set_key(key.data(), key.size(), salt.data(), salt.size(), 0);
11✔
31

32
         std::vector<uint8_t> block(8);
11✔
33
         blowfish.encrypt(block);
11✔
34

35
         result.test_bin_eq("Expected output", block, expected);
11✔
36

37
         return result;
11✔
38
      }
44✔
39
};
40

41
BOTAN_REGISTER_TEST("block", "blowfish_salted", Blowfish_Salted_Tests);
42

43
}  // namespace
44

45
}  // namespace Botan_Tests
46

47
#endif
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