func Hash()

in csmnamer/hash.go [45:53]


func Hash(s string, n int) string {
	var h string
	bytes := sha256.Sum256(([]byte)(s))
	for i := 0; i < n && i < len(bytes); i++ {
		idx := int(bytes[i]) % len(table)
		h += table[idx]
	}
	return h
}