LCOV - code coverage report
Current view: top level - third_party/heimdal/lib/hcrypto/libtommath - bn_mp_reduce_setup.c (source / functions) Hit Total Coverage
Test: coverage report for v4-17-test 1498b464 Lines: 0 4 0.0 %
Date: 2024-06-13 04:01:37 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "tommath_private.h"
       2             : #ifdef BN_MP_REDUCE_SETUP_C
       3             : /* LibTomMath, multiple-precision integer library -- Tom St Denis */
       4             : /* SPDX-License-Identifier: Unlicense */
       5             : 
       6             : /* pre-calculate the value required for Barrett reduction
       7             :  * For a given modulus "b" it calulates the value required in "a"
       8             :  */
       9           0 : mp_err mp_reduce_setup(mp_int *a, const mp_int *b)
      10             : {
      11             :    mp_err err;
      12           0 :    if ((err = mp_2expt(a, b->used * 2 * MP_DIGIT_BIT)) != MP_OKAY) {
      13           0 :       return err;
      14             :    }
      15           0 :    return mp_div(a, b, a, NULL);
      16             : }
      17             : #endif

Generated by: LCOV version 1.13