mirror of
https://github.com/arnaucube/darkID-prototype.git
synced 2026-02-08 03:46:45 +01:00
13 lines
186 B
Go
13 lines
186 B
Go
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))
|
|
}
|