You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

12 lines
186 B

package main
import (
"crypto/sha256"
"encoding/base64"
)
func hash(s string) string {
h := sha256.New()
h.Write([]byte(s))
return base64.URLEncoding.EncodeToString(h.Sum(nil))
}