diff --git a/rskj-core/src/main/java/org/ethereum/crypto/HashUtil.java b/rskj-core/src/main/java/org/ethereum/crypto/HashUtil.java index 59bed4e8cb6..aad79a2df3c 100644 --- a/rskj-core/src/main/java/org/ethereum/crypto/HashUtil.java +++ b/rskj-core/src/main/java/org/ethereum/crypto/HashUtil.java @@ -53,7 +53,9 @@ public static MessageDigest makeMessageDigest() { * @return - sha256 hash of the data */ public static byte[] sha256(byte[] input) { - return sha256digest.digest(input); + synchronized (sha256digest) { + return sha256digest.digest(input); + } } public static byte[] keccak256(byte[] input) {