Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3567

Programming • GMP library usage questions

$
0
0
Adding zeroes in front of number can be done e.g. by gmp_printf function, where is optional width parameter (which can be also argument of function, of course, in this case asterix “*” is used).

Code:

// +4 = +1+1+2: +1 for added digit, +1 for added zero and +2 for "0x" prefixgmp_printf("number=%#0*Zx\n", (int)sizein16 +4, number);
I think, that error is cuased by double including of ecdsa_arithmetic.h:
1st directly from main.c, 2nd by chain through comp_pubkey.h.
It can by avoided by standard trick, include guard, which is used in your system files (stdio.h etc.), too.

Statistics: Posted by ruwolf — 2024-01-06 21:59 — Replies 20 — Views 12020



Viewing all articles
Browse latest Browse all 3567