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

randombit / botan / 21768358452

06 Feb 2026 10:35PM UTC coverage: 90.064% (-0.003%) from 90.067%
21768358452

Pull #5289

github

web-flow
Merge f589db195 into 8ea0ca252
Pull Request #5289: Further misc header reductions, forward declarations, etc

102238 of 113517 relevant lines covered (90.06%)

11357432.36 hits per line

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

0.0
/src/lib/math/numbertheory/reducer.cpp
1
/*
2
* Modular Reducer
3
* (C) 1999-2011,2018,2025 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7

8
#include <botan/reducer.h>
9

10
#include <botan/exceptn.h>
11
#include <botan/internal/divide.h>
12

13
namespace Botan {
14

15
Modular_Reducer::Modular_Reducer(const BigInt& mod) : m_mod_words(mod.sig_words()) {
×
16
   if(mod < 0) {
×
17
      throw Invalid_Argument("Modular_Reducer: modulus must be positive");
×
18
   }
19

20
   m_modulus = mod;
×
21
}
×
22

23
BigInt Modular_Reducer::reduce(const BigInt& x) const {
×
24
   return ct_modulo(x, m_modulus);
×
25
}
26

27
}  // 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