arnaucube
arnaucube/darkID-prototypePublic Self-hosted repository
darkID-prototype/clientApp/hash.go
clientApp/hash.goRaw
 1package main
 2
 3import (
 4	"crypto/sha256"
 5	"encoding/base64"
 6)
 7
 8func hash(s string) string {
 9	h := sha256.New()
10	h.Write([]byte(s))
11	return base64.URLEncoding.EncodeToString(h.Sum(nil))
12}