bn_mp_exch.c 366 B

1234567891011121314151617
  1. #include "tommath_private.h"
  2. #ifdef BN_MP_EXCH_C
  3. /* LibTomMath, multiple-precision integer library -- Tom St Denis */
  4. /* SPDX-License-Identifier: Unlicense */
  5. /* swap the elements of two integers, for cases where you can't simply swap the
  6. * mp_int pointers around
  7. */
  8. void mp_exch(mp_int *a, mp_int *b)
  9. {
  10. mp_int t;
  11. t = *a;
  12. *a = *b;
  13. *b = t;
  14. }
  15. #endif