-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
#if (!defined SHA1DC_FORCE_LITTLEENDIAN) && \ | ||
((defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || \ | ||
(defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __BIG_ENDIAN__)) || \ | ||
defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \ | ||
defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \ | ||
defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) || defined(SHA1DC_FORCE_BIGENDIAN)) | ||
|
||
#define SHA1DC_BIGENDIAN | ||
|
@@ -1744,7 +1744,8 @@ void SHA1DCUpdate(SHA1_CTX* ctx, const char* buf, size_t len) | |
while (len >= 64) | ||
{ | ||
ctx->total += 64; | ||
sha1_process(ctx, (uint32_t*)(buf)); | ||
memcpy(ctx->buffer, buf, 64); | ||
sha1_process(ctx, (uint32_t*)(ctx->buffer)); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
shumow
Collaborator
|
||
buf += 64; | ||
len -= 64; | ||
} | ||
|
This impacts performance. Maybe this could be done only for CPUs that require quad-aligned access?