Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cr-marcstevens/sha1collisiondetection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-05-19 00:44:12 +0300
committerMarc Stevens <cr-marcstevens@users.noreply.github.com>2017-05-20 13:49:39 +0300
commit56e9ea30d42c09042b852c7f2c149a3e43ab8bc1 (patch)
tree0934e0364e946900e1ea31b32e12a4a23cef9a69
parentb0d20a0ee571ddcd24cd65435a6ee14ce877f4c2 (diff)
Fix misformatted code added in db45d67
The entirety of the rest of the file uses 8-width tabs, but this[1] change added 4-width spaces. 1. db45d67 ("Fix performance regression on processors that allow unaligned memory access. (#30)", 2017-05-18)
-rw-r--r--lib/sha1.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index 6d9f1a1..587158c 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1748,8 +1748,7 @@ void SHA1DCSetCallback(SHA1_CTX* ctx, collision_block_callback callback)
void SHA1DCUpdate(SHA1_CTX* ctx, const char* buf, size_t len)
{
unsigned left, fill;
-
- const uint32_t* buffer_to_hash = NULL;
+ const uint32_t* buffer_to_hash = NULL;
if (len == 0)
return;
@@ -1771,10 +1770,10 @@ void SHA1DCUpdate(SHA1_CTX* ctx, const char* buf, size_t len)
ctx->total += 64;
#if defined(SHA1DC_ALLOW_UNALIGNED_ACCESS)
- buffer_to_hash = (const uint32_t*)buf;
+ buffer_to_hash = (const uint32_t*)buf;
#else
- buffer_to_hash = (const uint32_t*)ctx->buffer;
- memcpy(ctx->buffer, buf, 64);
+ buffer_to_hash = (const uint32_t*)ctx->buffer;
+ memcpy(ctx->buffer, buf, 64);
#endif /* defined(SHA1DC_ALLOW_UNALIGNED_ACCESS) */
sha1_process(ctx, buffer_to_hash);
buf += 64;