From cba16944bff9d8c5dcf37be641822cd3de6d2ec1 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 14 Aug 2015 21:08:23 +0300 Subject: Initial commit providing GOST 2012 algorithms. --- gosthash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gosthash.c') diff --git a/gosthash.c b/gosthash.c index 72faa24..ee4a57d 100644 --- a/gosthash.c +++ b/gosthash.c @@ -255,6 +255,8 @@ int finish_hash(gost_hash_ctx * ctx, byte * hashval) fin_len += ctx->left; } memset(buf, 0, 32); + if (fin_len == 0) + hash_step(ctx->cipher_ctx, H, buf); bptr = buf; fin_len <<= 3; /* Hash length in BITS!! */ while (fin_len > 0) { -- cgit v1.1