mp_rand_source.c 372 B

123456789101112
  1. #include "tommath_private.h"
  2. #ifdef MP_RAND_C
  3. /* LibTomMath, multiple-precision integer library -- Tom St Denis */
  4. /* SPDX-License-Identifier: Unlicense */
  5. mp_err(*s_mp_rand_source)(void *out, size_t size) = s_mp_rand_platform;
  6. void mp_rand_source(mp_err(*source)(void *out, size_t size))
  7. {
  8. s_mp_rand_source = (source == NULL) ? s_mp_rand_platform : source;
  9. }
  10. #endif