diff options
Diffstat (limited to 'src/nvim/sha256.c')
-rw-r--r-- | src/nvim/sha256.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index db647f3ecb..d49224a987 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -1,6 +1,3 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check -// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com - /// @file sha256.c /// /// FIPS-180-2 compliant SHA-256 implementation @@ -18,8 +15,8 @@ #include <stdio.h> #include <string.h> +#include "nvim/memory.h" #include "nvim/sha256.h" -#include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "sha256.c.generated.h" @@ -201,14 +198,14 @@ void sha256_update(context_sha256_T *ctx, const uint8_t *input, size_t length) memcpy(ctx->buffer + left, input, fill); sha256_process(ctx, ctx->buffer); length -= fill; - input += fill; + input += fill; left = 0; } while (length >= SHA256_BUFFER_SIZE) { sha256_process(ctx, input); length -= SHA256_BUFFER_SIZE; - input += SHA256_BUFFER_SIZE; + input += SHA256_BUFFER_SIZE; } if (length) { @@ -230,7 +227,7 @@ void sha256_finish(context_sha256_T *ctx, uint8_t digest[SHA256_SUM_SIZE]) uint8_t msglen[8]; high = (ctx->total[0] >> 29) | (ctx->total[1] << 3); - low = (ctx->total[0] << 3); + low = (ctx->total[0] << 3); PUT_UINT32(high, msglen, 0); PUT_UINT32(low, msglen, 4); |