package tools import ( "crypto/sha256" "encoding/hex" ) func Sha256HashString(password string) (string, error) { hasher := sha256.New() hasher.Write([]byte(password)) hashed := hex.EncodeToString(hasher.Sum(nil)) return hashed, nil }