doomer/hasher.go

13 lines
185 B
Go
Raw Normal View History

2022-12-04 17:30:08 +03:00
package main
import (
"crypto/sha1"
"encoding/hex"
)
func hash(text string) string {
hasher := sha1.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}