diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-04-26 14:39:27 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-04-26 14:39:27 +0200 |
commit | a78265874b34c2885ceb32e839698b2a892b274e (patch) | |
tree | 7e0e4c2ab7e4911c8801bfbaae684687ecf1e1e0 /bignum.h | |
parent | 64bb6b36b0b12873a9ad93b77bc006f6fd7a70da (diff) | |
download | nettle-a78265874b34c2885ceb32e839698b2a892b274e.tar.gz |
Use size_t for bignums, rsa and dsa.
Diffstat (limited to 'bignum.h')
-rw-r--r-- | bignum.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -37,36 +37,36 @@ extern "C" { /* Size needed for signed encoding, including extra sign byte if * necessary. */ -unsigned +size_t nettle_mpz_sizeinbase_256_s(const mpz_t x); /* Size needed for unsigned encoding */ -unsigned +size_t nettle_mpz_sizeinbase_256_u(const mpz_t x); /* Writes an integer as length octets, using big endian byte order, * and two's complement for negative numbers. */ void -nettle_mpz_get_str_256(unsigned length, uint8_t *s, const mpz_t x); +nettle_mpz_get_str_256(size_t length, uint8_t *s, const mpz_t x); /* Reads a big endian, two's complement, integer. */ void nettle_mpz_set_str_256_s(mpz_t x, - unsigned length, const uint8_t *s); + size_t length, const uint8_t *s); void nettle_mpz_init_set_str_256_s(mpz_t x, - unsigned length, const uint8_t *s); + size_t length, const uint8_t *s); /* Similar, but for unsigned format. These function don't interpret * the most significant bit as the sign. */ void nettle_mpz_set_str_256_u(mpz_t x, - unsigned length, const uint8_t *s); + size_t length, const uint8_t *s); void nettle_mpz_init_set_str_256_u(mpz_t x, - unsigned length, const uint8_t *s); + size_t length, const uint8_t *s); /* Returns a uniformly distributed random number 0 <= x < 2^n */ void |