From: Victor Wagner Date: Tue, 8 Aug 2017 13:02:11 +0000 (+0300) Subject: Convert hash values to hex as little-endian numbers in gost12sum.c X-Git-Tag: v3.0.0~434 X-Git-Url: https://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=f2f9fc54848f46535bee3f120a32e4cc91ba2b15;p=openssl-gost%2Fengine.git Convert hash values to hex as little-endian numbers in gost12sum.c --- diff --git a/gost12sum.c b/gost12sum.c index 7c02c8e..887eb1c 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -227,7 +227,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum) } finish_hash12(ctx, buffer); for (i = 0; i < (hashsize / 8); i++) { - sprintf(sum + 2 * i, "%02x", buffer[i]); + sprintf(sum + 2 * i, "%02x", buffer[hashsize/8-1-i]); } return 1; }