Rename u_intXX_t to uintXX_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17445 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -69,9 +69,9 @@ a = cshift(a + OP(b,c,d) + X[k] + i, s)
|
||||
#define DO3(a,b,c,d,k,s,i) DOIT(a,b,c,d,k,s,i,H)
|
||||
|
||||
static inline void
|
||||
calc (struct md4 *m, u_int32_t *data)
|
||||
calc (struct md4 *m, uint32_t *data)
|
||||
{
|
||||
u_int32_t AA, BB, CC, DD;
|
||||
uint32_t AA, BB, CC, DD;
|
||||
|
||||
AA = A;
|
||||
BB = B;
|
||||
@@ -155,10 +155,10 @@ calc (struct md4 *m, u_int32_t *data)
|
||||
*/
|
||||
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
static inline u_int32_t
|
||||
swap_u_int32_t (u_int32_t t)
|
||||
static inline uint32_t
|
||||
swap_uint32_t (uint32_t t)
|
||||
{
|
||||
u_int32_t temp1, temp2;
|
||||
uint32_t temp1, temp2;
|
||||
|
||||
temp1 = cshift(t, 16);
|
||||
temp2 = temp1 >> 8;
|
||||
@@ -194,15 +194,15 @@ MD4_Update (struct md4 *m, const void *v, size_t len)
|
||||
if(offset == 64) {
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
int i;
|
||||
u_int32_t current[16];
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_u_int32_t(u[i].a);
|
||||
current[2*i+1] = swap_u_int32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
calc(m, (u_int32_t*)m->save);
|
||||
calc(m, (uint32_t*)m->save);
|
||||
#endif
|
||||
offset = 0;
|
||||
}
|
||||
@@ -241,10 +241,10 @@ MD4_Final (void *res, struct md4 *m)
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
u_int32_t *r = (u_int32_t *)res;
|
||||
uint32_t *r = (uint32_t *)res;
|
||||
|
||||
for (i = 0; i < 4; ++i)
|
||||
r[i] = swap_u_int32_t (m->counter[i]);
|
||||
r[i] = swap_uint32_t (m->counter[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -71,9 +71,9 @@ a = b + cshift(a + OP(b,c,d) + X[k] + (i), s)
|
||||
#define DO4(a,b,c,d,k,s,i) DOIT(a,b,c,d,k,s,i,I)
|
||||
|
||||
static inline void
|
||||
calc (struct md5 *m, u_int32_t *data)
|
||||
calc (struct md5 *m, uint32_t *data)
|
||||
{
|
||||
u_int32_t AA, BB, CC, DD;
|
||||
uint32_t AA, BB, CC, DD;
|
||||
|
||||
AA = A;
|
||||
BB = B;
|
||||
@@ -179,10 +179,10 @@ calc (struct md5 *m, u_int32_t *data)
|
||||
*/
|
||||
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
static inline u_int32_t
|
||||
swap_u_int32_t (u_int32_t t)
|
||||
static inline uint32_t
|
||||
swap_uint32_t (uint32_t t)
|
||||
{
|
||||
u_int32_t temp1, temp2;
|
||||
uint32_t temp1, temp2;
|
||||
|
||||
temp1 = cshift(t, 16);
|
||||
temp2 = temp1 >> 8;
|
||||
@@ -218,15 +218,15 @@ MD5_Update (struct md5 *m, const void *v, size_t len)
|
||||
if(offset == 64){
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
int i;
|
||||
u_int32_t current[16];
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_u_int32_t(u[i].a);
|
||||
current[2*i+1] = swap_u_int32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
calc(m, (u_int32_t*)m->save);
|
||||
calc(m, (uint32_t*)m->save);
|
||||
#endif
|
||||
offset = 0;
|
||||
}
|
||||
@@ -265,10 +265,10 @@ MD5_Final (void *res, struct md5 *m)
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
u_int32_t *r = (u_int32_t *)res;
|
||||
uint32_t *r = (uint32_t *)res;
|
||||
|
||||
for (i = 0; i < 4; ++i)
|
||||
r[i] = swap_u_int32_t (m->counter[i]);
|
||||
r[i] = swap_uint32_t (m->counter[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ PKCS5_PBKDF2_HMAC_SHA1(const void * password, size_t password_len,
|
||||
{
|
||||
size_t datalen, leftofkey, checksumsize;
|
||||
char *data, *tmpcksum;
|
||||
u_int32_t keypart;
|
||||
uint32_t keypart;
|
||||
const EVP_MD *md;
|
||||
unsigned long i;
|
||||
int j;
|
||||
|
||||
@@ -41,9 +41,9 @@ RCSID("$Id$");
|
||||
#include <rijndael-alg-fst.h>
|
||||
|
||||
/* the file should not be used from outside */
|
||||
typedef u_int8_t u8;
|
||||
typedef u_int16_t u16;
|
||||
typedef u_int32_t u32;
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
|
||||
/*
|
||||
Te0[x] = S [x].[02, 01, 01, 03];
|
||||
|
||||
@@ -82,8 +82,8 @@ static
|
||||
int
|
||||
sumFile (const char *name, int len, void *res)
|
||||
{
|
||||
u_int32_t sum[2] = { 0, 0 };
|
||||
u_int32_t buf[1024*2];
|
||||
uint32_t sum[2] = { 0, 0 };
|
||||
uint32_t buf[1024*2];
|
||||
int fd, i;
|
||||
|
||||
fd = open (name, 0);
|
||||
@@ -148,7 +148,7 @@ md5sumFile (const char *name, int len, int32_t sum[4])
|
||||
* based on an initial des key used as a seed.
|
||||
*/
|
||||
static DES_key_schedule sequence_seed;
|
||||
static u_int32_t sequence_index[2];
|
||||
static uint32_t sequence_index[2];
|
||||
|
||||
/*
|
||||
* Random number generator based on ideas from truerand in cryptolib
|
||||
|
||||
@@ -72,7 +72,7 @@ SHA1_Init (struct sha *m)
|
||||
|
||||
#define DO(t,f,k) \
|
||||
do { \
|
||||
u_int32_t temp; \
|
||||
uint32_t temp; \
|
||||
\
|
||||
temp = cshift(AA, 5) + f(BB,CC,DD) + EE + data[t] + k; \
|
||||
EE = DD; \
|
||||
@@ -83,10 +83,10 @@ do { \
|
||||
} while(0)
|
||||
|
||||
static inline void
|
||||
calc (struct sha *m, u_int32_t *in)
|
||||
calc (struct sha *m, uint32_t *in)
|
||||
{
|
||||
u_int32_t AA, BB, CC, DD, EE;
|
||||
u_int32_t data[80];
|
||||
uint32_t AA, BB, CC, DD, EE;
|
||||
uint32_t data[80];
|
||||
int i;
|
||||
|
||||
AA = A;
|
||||
@@ -204,11 +204,11 @@ calc (struct sha *m, u_int32_t *in)
|
||||
*/
|
||||
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(_CRAY)
|
||||
static inline u_int32_t
|
||||
swap_u_int32_t (u_int32_t t)
|
||||
static inline uint32_t
|
||||
swap_uint32_t (uint32_t t)
|
||||
{
|
||||
#define ROL(x,n) ((x)<<(n))|((x)>>(32-(n)))
|
||||
u_int32_t temp1, temp2;
|
||||
uint32_t temp1, temp2;
|
||||
|
||||
temp1 = cshift(t, 16);
|
||||
temp2 = temp1 >> 8;
|
||||
@@ -244,15 +244,15 @@ SHA1_Update (struct sha *m, const void *v, size_t len)
|
||||
if(offset == 64){
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(_CRAY)
|
||||
int i;
|
||||
u_int32_t current[16];
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_u_int32_t(u[i].a);
|
||||
current[2*i+1] = swap_u_int32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
calc(m, (u_int32_t*)m->save);
|
||||
calc(m, (uint32_t*)m->save);
|
||||
#endif
|
||||
offset = 0;
|
||||
}
|
||||
@@ -291,10 +291,10 @@ SHA1_Final (void *res, struct sha *m)
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
u_int32_t *r = (u_int32_t *)res;
|
||||
uint32_t *r = (uint32_t *)res;
|
||||
|
||||
for (i = 0; i < 5; ++i)
|
||||
r[i] = swap_u_int32_t (m->counter[i]);
|
||||
r[i] = swap_uint32_t (m->counter[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995 - 2001, 2006 Kungliga Tekniska Högskolan
|
||||
* Copyright (c) 2006 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -59,7 +59,7 @@ RCSID("$Id$");
|
||||
#define G m->counter[6]
|
||||
#define H m->counter[7]
|
||||
|
||||
static const u_int32_t constant_256[64] = {
|
||||
static const uint32_t constant_256[64] = {
|
||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||
@@ -94,10 +94,10 @@ SHA256_Init (SHA256_CTX *m)
|
||||
}
|
||||
|
||||
static void
|
||||
calc (SHA256_CTX *m, u_int32_t *in)
|
||||
calc (SHA256_CTX *m, uint32_t *in)
|
||||
{
|
||||
u_int32_t AA, BB, CC, DD, EE, FF, GG, HH;
|
||||
u_int32_t data[64];
|
||||
uint32_t AA, BB, CC, DD, EE, FF, GG, HH;
|
||||
uint32_t data[64];
|
||||
int i;
|
||||
|
||||
AA = A;
|
||||
@@ -116,7 +116,7 @@ calc (SHA256_CTX *m, u_int32_t *in)
|
||||
sigma0(data[i-15]) + data[i - 16];
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
u_int32_t T1, T2;
|
||||
uint32_t T1, T2;
|
||||
|
||||
T1 = HH + Sigma1(EE) + Ch(EE, FF, GG) + constant_256[i] + data[i];
|
||||
T2 = Sigma0(AA) + Maj(AA,BB,CC);
|
||||
@@ -146,11 +146,11 @@ calc (SHA256_CTX *m, u_int32_t *in)
|
||||
*/
|
||||
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(_CRAY)
|
||||
static inline u_int32_t
|
||||
swap_u_int32_t (u_int32_t t)
|
||||
static inline uint32_t
|
||||
swap_uint32_t (uint32_t t)
|
||||
{
|
||||
#define ROL(x,n) ((x)<<(n))|((x)>>(32-(n)))
|
||||
u_int32_t temp1, temp2;
|
||||
uint32_t temp1, temp2;
|
||||
|
||||
temp1 = cshift(t, 16);
|
||||
temp2 = temp1 >> 8;
|
||||
@@ -186,15 +186,15 @@ SHA256_Update (SHA256_CTX *m, const void *v, size_t len)
|
||||
if(offset == 64){
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(_CRAY)
|
||||
int i;
|
||||
u_int32_t current[16];
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_u_int32_t(u[i].a);
|
||||
current[2*i+1] = swap_u_int32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
calc(m, (u_int32_t*)m->save);
|
||||
calc(m, (uint32_t*)m->save);
|
||||
#endif
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user