forked from lda/telodendria
Fix type issues.
This commit is contained in:
parent
72bfa34bcd
commit
25dcff06a8
1 changed files with 4 additions and 4 deletions
|
@ -65,8 +65,8 @@ typedef unsigned int uint32_t;
|
||||||
#define WW(i) (w[i] = w[i - 16] + S0(w[i - 15]) + w[i - 7] + S1(w[i - 2]))
|
#define WW(i) (w[i] = w[i - 16] + S0(w[i - 15]) + w[i - 7] + S1(w[i - 2]))
|
||||||
|
|
||||||
#define ROUND(a, b, c, d, e, f, g, h, k, w) { \
|
#define ROUND(a, b, c, d, e, f, g, h, k, w) { \
|
||||||
unsigned long tmp0 = h + T0(e) + CH(e, f, g) + k + w; \
|
uint32_t tmp0 = h + T0(e) + CH(e, f, g) + k + w; \
|
||||||
unsigned long tmp1 = T1(a) + MAJ(a, b, c); \
|
uint32_t tmp1 = T1(a) + MAJ(a, b, c); \
|
||||||
h = tmp0 + tmp1; \
|
h = tmp0 + tmp1; \
|
||||||
d += tmp0; \
|
d += tmp0; \
|
||||||
}
|
}
|
||||||
|
@ -223,8 +223,8 @@ Sha256(char *str)
|
||||||
fill[0] = 0x80;
|
fill[0] = 0x80;
|
||||||
|
|
||||||
fillLen = (context.bufLen < 56) ? 56 - context.bufLen : 120 - context.bufLen;
|
fillLen = (context.bufLen < 56) ? 56 - context.bufLen : 120 - context.bufLen;
|
||||||
hiLen = (unsigned long) (context.length >> 29);
|
hiLen = (uint32_t) (context.length >> 29);
|
||||||
loLen = (unsigned long) (context.length << 3);
|
loLen = (uint32_t) (context.length << 3);
|
||||||
|
|
||||||
PUT_UINT32(&buf[0], hiLen);
|
PUT_UINT32(&buf[0], hiLen);
|
||||||
PUT_UINT32(&buf[4], loLen);
|
PUT_UINT32(&buf[4], loLen);
|
||||||
|
|
Loading…
Reference in a new issue