mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-22 04:21:08 +00:00
Trust the compiler to eliminate unnecessary conversions.
This commit is contained in:
parent
fd77c1c38e
commit
8f42136d40
2 changed files with 0 additions and 4 deletions
|
@ -117,10 +117,8 @@ md5_compute(md5_ctx *ctx, const uint8_t *block)
|
|||
int i;
|
||||
|
||||
memcpy(w, block, 64);
|
||||
#if WORDS_BIGENDIAN
|
||||
for (i = 0; i < 16; ++i)
|
||||
w[i] = le32toh(w[i]);
|
||||
#endif
|
||||
a = ctx->h[0];
|
||||
b = ctx->h[1];
|
||||
c = ctx->h[2];
|
||||
|
|
|
@ -85,10 +85,8 @@ sha1_compute(sha1_ctx *ctx, const uint8_t *block)
|
|||
uint32_t w[80], a, b, c, d, e;
|
||||
|
||||
memcpy(w, block, 64);
|
||||
#if !WORDS_BIGENDIAN
|
||||
for (int i = 0; i < 16; ++i)
|
||||
w[i] = be32toh(w[i]);
|
||||
#endif
|
||||
for (int i = 16; i < 80; ++i) {
|
||||
w[i] = w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16];
|
||||
w[i] = rol(w[i], 1);
|
||||
|
|
Loading…
Reference in a new issue