From fa5f12df89be5b02df9faeca25345ac78d327729 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 1 Feb 2018 21:29:35 +0100 Subject: [PATCH] Restart sha hash on init --- urbackupcommon/sha2/sha2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/urbackupcommon/sha2/sha2.cpp b/urbackupcommon/sha2/sha2.cpp index ddc9883d..9990f56e 100644 --- a/urbackupcommon/sha2/sha2.cpp +++ b/urbackupcommon/sha2/sha2.cpp @@ -954,7 +954,7 @@ int main() void sha256_init(sha256_ctx * ctx) { - + ctx->sha.Restart(); } void sha256_update(sha256_ctx *ctx, const unsigned char *message, @@ -970,6 +970,7 @@ void sha256_final(sha256_ctx *ctx, unsigned char *digest) void sha512_init(sha512_ctx *ctx) { + ctx->sha.Restart(); } void sha512_update(sha512_ctx *ctx, const unsigned char *message,