Personal Git forge.

Code git clone ssh://git.poy.ooo:6969/~poyo/farga ZIP
lib/crypto_sha256.go / 393B #717781a5
Raw
package libimport (	"crypto/sha256"	"encoding/hex"	"strings")// hashes an input into SHA256.func HashSHA256(input []byte) string {	hasher := sha256.New()	hasher.Write(input)	return hex.EncodeToString(hasher.Sum(nil))}// validates whether an input produces a hash or not.func ValidateSHA256(input []byte, hash string) bool {	return strings.EqualFold(HashSHA256(input), hash)}