XBinder  Version 2.6.x
rtxBigNumber.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
28 #ifndef _RTXBIGNUMBER_H_
29 #define _RTXBIGNUMBER_H_
30 
31 #include "rtxsrc/rtxContext.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /* BigNumber functions */
38 
51 int rtxAddBigNum (const OSOCTET* a, OSSIZE szA,
52  const OSOCTET* b, OSSIZE szB,
53  OSOCTET* c, OSSIZE szC);
54 
67 int rtxSubBigNum (const OSOCTET* a, OSSIZE szA,
68  const OSOCTET* b, OSSIZE szB,
69  OSOCTET* c, OSSIZE szC);
70 
83 int rtxMulBigNum (const OSOCTET* a, OSSIZE szA,
84  const OSOCTET* b, OSSIZE szB,
85  OSOCTET* c, OSSIZE szC);
86 
101 int rtxDivRemBigNum (const OSOCTET* a, OSSIZE szA,
102  const OSOCTET* b, OSSIZE szB,
103  OSOCTET* c, OSSIZE szC,
104  OSOCTET* rem, OSSIZE szRem);
105 
118 int rtxDivBigNum (const OSOCTET* a, OSSIZE szA,
119  const OSOCTET* b, OSSIZE szB,
120  OSOCTET* c, OSSIZE szC);
121 
134 int rtxModBigNum (const OSOCTET* a, OSSIZE szA,
135  const OSOCTET* b, OSSIZE szB,
136  OSOCTET* rem, OSSIZE szRem);
137 
148 int rtxBigNumToStr (const OSOCTET* a, OSSIZE szA,
149  char* str, OSSIZE szStr);
150 
160 int rtxStrToBigNum (const char* str, OSOCTET* a, OSSIZE szA);
161 
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* RTXBIGINT */
int rtxModBigNum(const OSOCTET *a, OSSIZE szA, const OSOCTET *b, OSSIZE szB, OSOCTET *rem, OSSIZE szRem)
Division by module big numbers: a % b = rem.
int rtxSubBigNum(const OSOCTET *a, OSSIZE szA, const OSOCTET *b, OSSIZE szB, OSOCTET *c, OSSIZE szC)
Substraction big numbers: a - b = c.
int rtxAddBigNum(const OSOCTET *a, OSSIZE szA, const OSOCTET *b, OSSIZE szB, OSOCTET *c, OSSIZE szC)
Addition big numbers: a + b = c.
int rtxDivBigNum(const OSOCTET *a, OSSIZE szA, const OSOCTET *b, OSSIZE szB, OSOCTET *c, OSSIZE szC)
Division big numbers: a / b = c.
int rtxMulBigNum(const OSOCTET *a, OSSIZE szA, const OSOCTET *b, OSSIZE szB, OSOCTET *c, OSSIZE szC)
Multiplication big numbers: a * b = c.
Common run-time context definitions.
int rtxStrToBigNum(const char *str, OSOCTET *a, OSSIZE szA)
Convert string to big number.
int rtxDivRemBigNum(const OSOCTET *a, OSSIZE szA, const OSOCTET *b, OSSIZE szB, OSOCTET *c, OSSIZE szC, OSOCTET *rem, OSSIZE szRem)
Division big numbers with reminder: a / b = c.
int rtxBigNumToStr(const OSOCTET *a, OSSIZE szA, char *str, OSSIZE szStr)
Convert big number to string.