libtommath/bn_mp_exch.c

18 lines
366 B
C
Raw Normal View History

#include "tommath_private.h"
2004-10-29 22:07:18 +00:00
#ifdef BN_MP_EXCH_C
2019-04-07 13:29:11 +00:00
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
2003-02-28 16:08:34 +00:00
2017-08-30 03:51:11 +00:00
/* swap the elements of two integers, for cases where you can't simply swap the
2003-12-24 18:59:22 +00:00
* mp_int pointers around
2003-03-29 18:16:01 +00:00
*/
2017-08-30 17:07:12 +00:00
void mp_exch(mp_int *a, mp_int *b)
2003-02-28 16:08:34 +00:00
{
2017-08-29 20:23:48 +00:00
mp_int t;
2003-02-28 16:08:34 +00:00
2017-08-29 20:23:48 +00:00
t = *a;
*a = *b;
*b = t;
2003-02-28 16:08:34 +00:00
}
2004-10-29 22:07:18 +00:00
#endif