Use standard unsigned integer types

This commit is contained in:
Andreas Steffen
2016-03-24 18:52:48 +01:00
parent b210369314
commit b12c53ce77
584 changed files with 3430 additions and 3430 deletions
+7 -7
View File
@@ -35,17 +35,17 @@ struct private_ntru_drbg_t {
/**
* Security strength in bits of the DRBG
*/
u_int32_t strength;
uint32_t strength;
/**
* Number of requests for pseudorandom bits
*/
u_int32_t reseed_counter;
uint32_t reseed_counter;
/**
* Maximum number of requests for pseudorandom bits
*/
u_int32_t max_requests;
uint32_t max_requests;
/**
* True entropy source
@@ -111,7 +111,7 @@ static bool update(private_ntru_drbg_t *this, chunk_t data)
return TRUE;
}
METHOD(ntru_drbg_t, get_strength, u_int32_t,
METHOD(ntru_drbg_t, get_strength, uint32_t,
private_ntru_drbg_t *this)
{
return this->strength;
@@ -142,7 +142,7 @@ METHOD(ntru_drbg_t, reseed, bool,
}
METHOD(ntru_drbg_t, generate, bool,
private_ntru_drbg_t *this, u_int32_t strength, u_int32_t len, u_int8_t *out)
private_ntru_drbg_t *this, uint32_t strength, uint32_t len, uint8_t *out)
{
size_t delta;
chunk_t output;
@@ -206,14 +206,14 @@ METHOD(ntru_drbg_t, destroy, void,
/*
* Described in header.
*/
ntru_drbg_t *ntru_drbg_create(u_int32_t strength, chunk_t pers_str,
ntru_drbg_t *ntru_drbg_create(uint32_t strength, chunk_t pers_str,
rng_t *entropy)
{
private_ntru_drbg_t *this;
chunk_t seed;
signer_t *hmac;
size_t entropy_len;
u_int32_t max_requests;
uint32_t max_requests;
if (strength > MAX_STRENGTH_BITS)
{
+4 -4
View File
@@ -36,7 +36,7 @@ struct ntru_drbg_t {
*
* @return configured security strength in bits
*/
u_int32_t (*get_strength)(ntru_drbg_t *this);
uint32_t (*get_strength)(ntru_drbg_t *this);
/**
* Reseed the instantiated DRBG
@@ -54,8 +54,8 @@ struct ntru_drbg_t {
* @param out address of output buffer
* @return TRUE if successful
*/
bool (*generate)(ntru_drbg_t *this, u_int32_t strength, u_int32_t len,
u_int8_t *out);
bool (*generate)(ntru_drbg_t *this, uint32_t strength, uint32_t len,
uint8_t *out);
/**
* Get a reference on an ntru_drbg_t object increasing the count by one
@@ -77,7 +77,7 @@ struct ntru_drbg_t {
* @param pers_str personalization string
* @param entropy entropy source to use
*/
ntru_drbg_t *ntru_drbg_create(u_int32_t strength, chunk_t pers_str,
ntru_drbg_t *ntru_drbg_create(uint32_t strength, chunk_t pers_str,
rng_t *entropy);
#endif /** NTRU_DRBG_H_ @}*/
+2 -2
View File
@@ -66,7 +66,7 @@ struct private_ntru_ke_t {
/**
* Cryptographical strength in bits of the NTRU Parameter Set
*/
u_int32_t strength;
uint32_t strength;
/**
* NTRU Public Key
@@ -247,7 +247,7 @@ ntru_ke_t *ntru_ke_create(diffie_hellman_group_t group, chunk_t g, chunk_t p)
rng_t *entropy;
ntru_drbg_t *drbg;
char *parameter_set;
u_int32_t strength;
uint32_t strength;
parameter_set = lib->settings->get_str(lib->settings,
"%s.plugins.ntru.parameter_set", "optimum", lib->ns);