Initial Commit
continuous-integration/drone/push Build is passing

This commit is contained in:
volker.raschek committed 2023-10-02 12:50:34 +02:00
commit 3998f9e2c2
38 files changed
+3485

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
package auth
import (
"crypto/sha256"
"encoding/hex"
)
func hash(data []byte) []byte {
if len(data) == 0 {
return []byte{}
}
b := sha256.Sum256(data)
return b[:]
}
func HashString(data string) string {
return hex.EncodeToString(hash([]byte(data)))
}