refactor/dependence: Upgrade Golang version and dependencies. (#322)

* chore: Set up automated package updates with dependabot.
This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2024-04-12 19:57:32 +08:00
parent 536f2082f9
commit 06fc064418
12 changed files with 123 additions and 69 deletions
+2 -3
View File
@@ -12,9 +12,8 @@ import (
"os/exec"
"strings"
"golang.org/x/crypto/pbkdf2"
"github.com/moond4rk/hackbrowserdata/types"
"github.com/moond4rk/hackbrowserdata/utils/cryptoutil"
)
var (
@@ -50,7 +49,7 @@ func (c *Chromium) GetMasterKey() ([]byte, error) {
}
salt := []byte("saltysalt")
// @https://source.chromium.org/chromium/chromium/src/+/master:components/os_crypt/os_crypt_mac.mm;l=157
key := pbkdf2.Key(secret, salt, 1003, 16, sha1.New)
key := cryptoutil.PBKDF2Key(secret, salt, 1003, 16, sha1.New)
if key == nil {
return nil, errWrongSecurityCommand
}
+2 -2
View File
@@ -10,9 +10,9 @@ import (
"github.com/godbus/dbus/v5"
keyring "github.com/ppacher/go-dbus-keyring"
"golang.org/x/crypto/pbkdf2"
"github.com/moond4rk/hackbrowserdata/types"
"github.com/moond4rk/hackbrowserdata/utils/cryptoutil"
)
func (c *Chromium) GetMasterKey() ([]byte, error) {
@@ -69,7 +69,7 @@ func (c *Chromium) GetMasterKey() ([]byte, error) {
}
salt := []byte("saltysalt")
// @https://source.chromium.org/chromium/chromium/src/+/master:components/os_crypt/os_crypt_linux.cc
key := pbkdf2.Key(secret, salt, 1, 16, sha1.New)
key := cryptoutil.PBKDF2Key(secret, salt, 1, 16, sha1.New)
c.masterKey = key
slog.Info("get master key success", "browser", c.name)
return key, nil