mirror of
https://github.com/openziti/zrok.git
synced 2025-08-19 04:06:18 +02:00
remove immediate create; streamline controller account infrastructure (#50)
This commit is contained in:
@@ -2,6 +2,7 @@ package controller
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/sha512"
|
||||
"crypto/x509"
|
||||
"encoding/hex"
|
||||
errors2 "github.com/go-openapi/errors"
|
||||
@@ -53,3 +54,9 @@ func createServiceName() (string, error) {
|
||||
}
|
||||
return hex.EncodeToString(bytes), nil
|
||||
}
|
||||
|
||||
func hashPassword(raw string) string {
|
||||
hash := sha512.New()
|
||||
hash.Write([]byte(raw))
|
||||
return hex.EncodeToString(hash.Sum(nil))
|
||||
}
|
||||
|
Reference in New Issue
Block a user