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

* chore: Set up automated package updates with dependabot.
This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ committed 2024-04-12 20:01:29 +08:00
1 parent 536f2082f9
commit 06fc064418
12 files changed
+123 -69

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ import (
"encoding/asn1"
"errors"
"golang.org/x/crypto/pbkdf2"
"github.com/moond4rk/hackbrowserdata/utils/cryptoutil"
)
type ASN1PBE interface {
@@ -158,7 +158,7 @@ func (m metaPBE) deriveKeyAndIV(globalSalt []byte) ([]byte, []byte) {
iter := m.AlgoAttr.Data.Data.SlatAttr.IterationCount
keyLen := m.AlgoAttr.Data.Data.SlatAttr.KeySize
key := pbkdf2.Key(password[:], salt, iter, keyLen, sha256.New)
key := cryptoutil.PBKDF2Key(password[:], salt, iter, keyLen, sha256.New)
iv := append([]byte{4, 14}, m.AlgoAttr.Data.IVData.IV...)
return key, iv
}