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