summaryrefslogtreecommitdiff
path: root/libs/libsodium/src/crypto_hash/sha256
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-06-21 14:29:17 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-06-21 14:29:17 +0300
commit46ea86584a9787c8b9dc3983cf23d9b5b93b5841 (patch)
treefbaf3793ae2170f7982f08a62c028a23cd9afedd /libs/libsodium/src/crypto_hash/sha256
parent82e75be329dd0f30c0281ef9c3c08488b89d109f (diff)
fixes #4477 (libsodium: update to 1.0.20)
Diffstat (limited to 'libs/libsodium/src/crypto_hash/sha256')
-rw-r--r--libs/libsodium/src/crypto_hash/sha256/cp/hash_sha256_cp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/libsodium/src/crypto_hash/sha256/cp/hash_sha256_cp.c b/libs/libsodium/src/crypto_hash/sha256/cp/hash_sha256_cp.c
index 3b1acda992..ee1d4ceb27 100644
--- a/libs/libsodium/src/crypto_hash/sha256/cp/hash_sha256_cp.c
+++ b/libs/libsodium/src/crypto_hash/sha256/cp/hash_sha256_cp.c
@@ -156,6 +156,7 @@ SHA256_Pad(crypto_hash_sha256_state *state, uint32_t tmp32[64 + 8])
unsigned int r;
unsigned int i;
+ ACQUIRE_FENCE;
r = (unsigned int) ((state->count >> 3) & 0x3f);
if (r < 56) {
for (i = 0; i < 56 - r; i++) {
@@ -197,6 +198,7 @@ crypto_hash_sha256_update(crypto_hash_sha256_state *state,
if (inlen <= 0U) {
return 0;
}
+ ACQUIRE_FENCE;
r = (unsigned long long) ((state->count >> 3) & 0x3f);
state->count += ((uint64_t) inlen) << 3;