chore: upgrade libraries

This commit is contained in:
andig 2022-11-16 10:46:12 +01:00
parent ca1752ff91
commit 66abe9e4cd
9 changed files with 93 additions and 94 deletions

View file

@ -7,7 +7,7 @@ import (
"fmt"
"strings"
"github.com/evcc-io/evcc/util"
"github.com/samber/lo"
"github.com/denisbrodbeck/machineid"
)
@ -32,7 +32,7 @@ func CustomID(cid string) error {
// RandomID creates a random id
func RandomID() string {
rnd := util.RandomString(512)
rnd := lo.RandomString(512, lo.LettersCharset)
mac := hmac.New(sha256.New, []byte(rnd))
return hex.EncodeToString(mac.Sum(nil))
}