aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/crypto.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils/crypto.go')
-rw-r--r--core/utils/crypto.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/utils/crypto.go b/core/utils/crypto.go
index 7532d29..8be503f 100644
--- a/core/utils/crypto.go
+++ b/core/utils/crypto.go
@@ -323,3 +323,12 @@ func VerifyDKGFinalizeSignature(
}
return true, nil
}
+
+// Rehash hashes the hash again and again and again...
+func Rehash(hash common.Hash, count uint) common.Hash {
+ result := hash
+ for i := uint(0); i < count; i++ {
+ result = crypto.Keccak256Hash(result[:])
+ }
+ return result
+}