aboutsummaryrefslogtreecommitdiff
path: root/gosthash.c
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2015-08-14 21:08:23 +0300
committerDmitry Belyavskiy <beldmit@gmail.com>2015-08-14 21:08:23 +0300
commitcba16944bff9d8c5dcf37be641822cd3de6d2ec1 (patch)
tree5c8ad3f27fcc3e0a67a53de21db39fca68b8fa9e /gosthash.c
parentc98ba9d03213d0c63d6874539d59f7b55fbc3fae (diff)
downloadgost-engine-cba16944bff9d8c5dcf37be641822cd3de6d2ec1.zip
gost-engine-cba16944bff9d8c5dcf37be641822cd3de6d2ec1.tar.gz
gost-engine-cba16944bff9d8c5dcf37be641822cd3de6d2ec1.tar.bz2
Initial commit providing GOST 2012 algorithms.
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) {