Go to the source code of this file.
|
RZ_API RzNumBig * | rz_big_new (void) |
|
RZ_API void | rz_big_free (RzNumBig *b) |
|
RZ_API void | rz_big_init (RzNumBig *b) |
|
RZ_API void | rz_big_fini (RzNumBig *b) |
|
RZ_API void | rz_big_from_int (RzNumBig *b, st64 v) |
|
RZ_API st64 | rz_big_to_int (RzNumBig *b) |
|
RZ_API void | rz_big_from_hexstr (RzNumBig *b, const char *str) |
|
RZ_API char * | rz_big_to_hexstr (RzNumBig *b) |
|
RZ_API void | rz_big_assign (RzNumBig *dst, RzNumBig *src) |
|
RZ_API void | rz_big_add (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_sub (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_mul (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_div (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_mod (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_divmod (RzNumBig *c, RzNumBig *d, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_and (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_or (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_xor (RzNumBig *c, RzNumBig *a, RzNumBig *b) |
|
RZ_API void | rz_big_lshift (RzNumBig *c, RzNumBig *a, size_t nbits) |
|
RZ_API void | rz_big_rshift (RzNumBig *c, RzNumBig *a, size_t nbits) |
|
RZ_API int | rz_big_cmp (RzNumBig *a, RzNumBig *b) |
|
RZ_API int | rz_big_is_zero (RzNumBig *a) |
|
RZ_API void | rz_big_inc (RzNumBig *a) |
|
RZ_API void | rz_big_dec (RzNumBig *a) |
|
RZ_API void | rz_big_powm (RzNumBig *c, RzNumBig *a, RzNumBig *b, RzNumBig *m) |
|
RZ_API void | rz_big_isqrt (RzNumBig *c, RzNumBig *a) |
|
◆ rz_big_add()
◆ rz_big_and()
◆ rz_big_assign()
◆ rz_big_cmp()
Definition at line 107 of file big-gmp.c.
108 int res = mpz_cmp(*
a, *
b);
111 }
else if (res < 0) {
◆ rz_big_dec()
◆ rz_big_div()
◆ rz_big_divmod()
◆ rz_big_fini()
◆ rz_big_free()
Definition at line 15 of file big-gmp.c.
RZ_API void Ht_() free(HtName_(Ht) *ht)
◆ rz_big_from_hexstr()
Definition at line 36 of file big-gmp.c.
39 mpz_set_str(*
b,
str, 16);
42 mpz_set_str(*
b,
str, 16);
43 mpz_mul_si(*
b, *
b, -1);
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
◆ rz_big_from_int()
◆ rz_big_inc()
◆ rz_big_init()
◆ rz_big_is_zero()
Definition at line 118 of file big-gmp.c.
119 return mpz_cmp_ui(*
a, 0) == 0;
◆ rz_big_isqrt()
◆ rz_big_lshift()
Definition at line 99 of file big-gmp.c.
100 mpz_mul_2exp(*
c, *
a, nbits);
◆ rz_big_mod()
◆ rz_big_mul()
◆ rz_big_new()
◆ rz_big_or()
◆ rz_big_powm()
◆ rz_big_rshift()
Definition at line 103 of file big-gmp.c.
104 mpz_tdiv_q_2exp(*
c, *
a, nbits);
◆ rz_big_sub()
◆ rz_big_to_hexstr()
Definition at line 47 of file big-gmp.c.
48 char *
tmp = mpz_get_str(
NULL, 16, *
b);
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
◆ rz_big_to_int()
Definition at line 32 of file big-gmp.c.
33 return mpz_get_si(*
b);
◆ rz_big_xor()