To create a blake2s hash from a string in go, we need to follow these steps:
"crypto/blake2s" and "encoding/hex".blake2s.New256().hash.Write([]byte).hash.Sum(nil).hex.EncodeToString([]byte).Here's the code:
main.go432 chars22 linesTo use this function, simply call createBlake2sHash with the string you want to hash. It will return the blake2s hash as a hex-encoded string.
gistlibby LogSnag