diff --git a/pkg/auth/provider.go b/pkg/auth/provider.go index a1f4fe5..f372976 100644 --- a/pkg/auth/provider.go +++ b/pkg/auth/provider.go @@ -1,9 +1,7 @@ package auth import ( - "crypto/rand" "encoding/base64" - "encoding/hex" "golang.org/x/crypto/bcrypt" @@ -21,8 +19,6 @@ type User struct { type HomeAssistantProvider struct { AuthProviderBase `json:"-"` Users []User `json:"users"` - - salt string `json:"-"` } func NewHAProvider(s storage.Store) (*HomeAssistantProvider, error) { @@ -41,13 +37,6 @@ func NewHAProvider(s storage.Store) (*HomeAssistantProvider, error) { return hap, nil } -func genSalt() string { - b := make([]byte, 32) - rand.Read(b) - - return hex.EncodeToString(b) -} - func (hap *HomeAssistantProvider) hashPass(p string) ([]byte, error) { return bcrypt.GenerateFromPassword([]byte(p), bcrypt.DefaultCost) }