]> git.ipfire.org Git - thirdparty/freeswitch.git/blob - libs/libzrtp/third_party/bnlib/lbn68020.h
[mod_http_cache] Fix leaking curl handle in http_get()
[thirdparty/freeswitch.git] / libs / libzrtp / third_party / bnlib / lbn68020.h
1 /*
2 * Copyright (c) 1995 Colin Plumb. All rights reserved.
3 * For licensing and other legal details, see the file legal.c.
4 *
5 * lbn68020.h - 32-bit bignum primitives for the 68020 (or 683xx) processors.
6 *
7 * These primitives use little-endian word order.
8 * (The order of bytes within words is irrelevant.)
9 */
10 #define BN_LITTLE_ENDIAN 1
11
12 typedef unsigned long bnword32;
13 #define BNWORD32 bnword32
14
15 bnword32 lbnSub1_32(bnword32 *num, unsigned len, bnword32 borrow);
16 bnword32 lbnAdd1_32(bnword32 *num, unsigned len, bnword32 carry);
17 void lbnMulN1_32(bnword32 *out, bnword32 const *in, unsigned len, bnword32 k);
18 bnword32
19 lbnMulAdd1_32(bnword32 *out, bnword32 const *in, unsigned len, bnword32 k);
20 bnword32
21 lbnMulSub1_32(bnword32 *out, bnword32 const *in, unsigned len, bnword32 k);
22 bnword32 lbnDiv21_32(bnword32 *q, bnword32 nh, bnword32 nl, bnword32 d);
23 unsigned lbnModQ_32(bnword32 const *n, unsigned len, unsigned d);
24
25 /* #define the values to exclude the C versions */
26 #define lbnSub1_32 lbnSub1_32
27 #define lbnAdd1_32 lbnAdd1_32
28 #define lbnMulN1_32 lbnMulN1_32
29 #define lbnMulAdd1_32 lbnMulAdd1_32
30 #define lbnMulSub1_32 lbnMulSub1_32
31 #define lbnDiv21_32 lbnDiv21_32
32 #define lbnModQ_32 lbnModQ_32