mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Fix sha1_digest bug
This commit is contained in:
@@ -167,5 +167,6 @@ void sha1_digest(const unsigned char *data, size_t datalen,
|
|||||||
SHA1_CTX ctx;
|
SHA1_CTX ctx;
|
||||||
sha1_init(&ctx);
|
sha1_init(&ctx);
|
||||||
sha1_update(&ctx, data, datalen);
|
sha1_update(&ctx, data, datalen);
|
||||||
|
sha1_finish(&ctx, dgst);
|
||||||
memset(&ctx, 0, sizeof(ctx));
|
memset(&ctx, 0, sizeof(ctx));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user