diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/whrlpool/whirlpool.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/libcrypto/whrlpool/whirlpool.c b/src/lib/libcrypto/whrlpool/whirlpool.c index e1e0f7a899..80e147c3b5 100644 --- a/src/lib/libcrypto/whrlpool/whirlpool.c +++ b/src/lib/libcrypto/whrlpool/whirlpool.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: whirlpool.c,v 1.2 2024/03/30 03:45:47 joshua Exp $ */ | 1 | /* $OpenBSD: whirlpool.c,v 1.3 2024/06/01 07:36:17 tb Exp $ */ |
2 | /** | 2 | /** |
3 | * The Whirlpool hashing function. | 3 | * The Whirlpool hashing function. |
4 | * | 4 | * |
@@ -846,10 +846,7 @@ unsigned char * | |||
846 | WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md) | 846 | WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md) |
847 | { | 847 | { |
848 | WHIRLPOOL_CTX ctx; | 848 | WHIRLPOOL_CTX ctx; |
849 | static unsigned char m[WHIRLPOOL_DIGEST_LENGTH]; | ||
850 | 849 | ||
851 | if (md == NULL) | ||
852 | md = m; | ||
853 | WHIRLPOOL_Init(&ctx); | 850 | WHIRLPOOL_Init(&ctx); |
854 | WHIRLPOOL_Update(&ctx, inp, bytes); | 851 | WHIRLPOOL_Update(&ctx, inp, bytes); |
855 | WHIRLPOOL_Final(md, &ctx); | 852 | WHIRLPOOL_Final(md, &ctx); |