From 2c24950b039fc8327bca1b0e16acbfb5e58e7f7a Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Fri, 8 May 2020 17:37:38 +0900 Subject: [PATCH] Z_pad is static constant --- src/fp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fp.cpp b/src/fp.cpp index aab8e1e..cc39188 100644 --- a/src/fp.cpp +++ b/src/fp.cpp @@ -165,7 +165,7 @@ void expand_message_xmd(uint8_t out[256], const void *msg, size_t msgSize, const const size_t mdSize = 32; const size_t r_in_bytes = 64; const size_t ell = len_in_bytes / mdSize; - uint8_t Z_pad[r_in_bytes] = {}; + static const uint8_t Z_pad[r_in_bytes] = {}; assert(dstSize < 256); // BE(len_in_bytes, 2) + BE(0, 1) + BE(dstSize, 1) uint8_t buf[2 + 1 + 1] = { 1, 0, 0, uint8_t(dstSize) };