LCOV - code coverage report
Current view: top level - source4/heimdal/lib/hcrypto/libtommath - bn_mp_find_prime.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 0 8 0.0 %
Date: 2021-09-23 10:06:22 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /* TomsFastMath, a fast ISO C bignum library.
       2             :  *
       3             :  * This project is public domain and free for all purposes.
       4             :  *
       5             :  * Love Hornquist Astrand <lha@h5l.org>
       6             :  */
       7             : #include <tommath.h>
       8             : 
       9           0 : int mp_find_prime(mp_int *a)
      10             : {
      11             :   int res;
      12             : 
      13           0 :   if (mp_iseven(a))
      14           0 :     mp_add_d(a, 1, a);
      15             : 
      16             :   do {
      17             : 
      18           0 :     if ((res = mp_isprime(a)) == MP_NO) {
      19           0 :       mp_add_d(a, 2, a);
      20           0 :       continue;
      21             :     }
      22             : 
      23           0 :   } while (res != MP_YES);
      24             : 
      25           0 :   return res;
      26             : }

Generated by: LCOV version 1.13