blob: b10393a4d25b27b5a092c7c1bb53e27382164283 [file] [log] [blame]
Alexandre Lision7fd5d3d2013-12-04 13:06:40 -05001#ifndef BNPRINT_H
2#define BNPRINT_H
3
4#include <stdio.h>
5
6#ifdef __cplusplus
7extern "C"
8{
9#endif
10
11struct BigNum;
12
13#ifndef SWIG
14int bnPrint(FILE *f, char const *prefix, struct BigNum const *bn,
15 char const *suffix);
16#endif
17
18/**
19 * Convert an ASCII string into a BigNum.
20 *
21 * This function converts an ASCII string into a Big number. If the first
22 * character of the string is a minus sign the big number is a negative number.
23 *
24 * @param X the BigNum that stores the result
25 *
26 * @param s the ASCII string in big-endian format (first digit is most significant)
27 *
28 * @param radix the function can use radix between 2 and 16
29 */
30int bnReadAscii(struct BigNum *X, char *s, int radix);
31#ifdef __cplusplus
32}
33#endif
34
35#endif /* BNPRINT_H */