remove immediate create; streamline controller account infrastructure (#50)

This commit is contained in:
Michael Quigley
2022-09-20 14:05:27 -04:00
parent a6e203b28e
commit 3ac9541463
3 changed files with 7 additions and 48 deletions

View File

@@ -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))
}