aboutsummaryrefslogtreecommitdiff
path: root/gosthash.c
diff options
context:
space:
mode:
Diffstat (limited to 'gosthash.c')
-rw-r--r--gosthash.c2
1 files changed, 2 insertions, 0 deletions
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) {