Merge branch 'main' into Xe/small-sec-fixes

Signed-off-by: Xe Iaso <xe.iaso@techaro.lol>
This commit is contained in:
Xe Iaso
2026-05-30 00:42:41 -04:00
committed by GitHub
7 changed files with 519 additions and 388 deletions
+2 -3
View File
@@ -11,9 +11,8 @@ import (
// SHA256sum computes a cryptographic hash. Still used for proof-of-work challenges
// where we need the security properties of a cryptographic hash function.
func SHA256sum(text string) string {
hash := sha256.New()
hash.Write([]byte(text))
return hex.EncodeToString(hash.Sum(nil))
sum := sha256.Sum256([]byte(text))
return hex.EncodeToString(sum[:])
}
// FastHash is a high-performance non-cryptographic hash function suitable for