Deprecate the internal int/uint types in favor of the cstdint types they were based on

This commit is contained in:
Tim Wojtulewicz 2019-07-30 11:38:42 -07:00
parent 18e4976c6c
commit 54752ef9a1
218 changed files with 1331 additions and 1323 deletions

View file

@ -47,7 +47,7 @@ HashKey::HashKey(bro_uint_t u)
is_our_dynamic = 0;
}
HashKey::HashKey(uint32 u)
HashKey::HashKey(uint32_t u)
{
key_u.u32 = u;
key = (void*) &key_u;
@ -56,7 +56,7 @@ HashKey::HashKey(uint32 u)
is_our_dynamic = 0;
}
HashKey::HashKey(const uint32 u[], int n)
HashKey::HashKey(const uint32_t u[], int n)
{
size = n * sizeof(u[0]);
key = (void*) u;
@ -173,7 +173,7 @@ hash_t HashKey::HashBytes(const void* bytes, int size)
// Fall back to HMAC/MD5 for longer data (which is usually rare).
assert(sizeof(hash_t) == 8);
hash_t digest[2]; // 2x hash_t (uint64) = 128 bits = 32 hex chars = sizeof md5
hash_t digest[2]; // 2x hash_t (uint64_t) = 128 bits = 32 hex chars = sizeof md5
hmac_md5(size, (const unsigned char*) bytes, (unsigned char*) digest);
return digest[0];
}