fix chrome for windows decrypt error. Close #21

v0.1.8
ᴍᴏᴏɴD4ʀᴋ 4 years ago
parent 448a5d4666
commit 59f4c67f41
  1. 2
      core/decrypt/decrypt.go
  2. 2
      core/decrypt/decrypt_windows.go

@ -19,7 +19,7 @@ var (
func aes128CBCDecrypt(key, iv, encryptPass []byte) ([]byte, error) {
block, err := aes.NewCipher(key)
if err != nil {
return []byte{}, err
return nil, err
}
dst := make([]byte, len(encryptPass))
mode := cipher.NewCBCDecrypter(block, iv)

@ -14,7 +14,7 @@ import (
"golang.org/x/crypto/pbkdf2"
)
func ChromePass(encryptPass, key []byte) ([]byte, error) {
func ChromePass(key, encryptPass []byte) ([]byte, error) {
if len(encryptPass) > 15 {
// remove prefix 'v10'
return aesGCMDecrypt(encryptPass[15:], key, encryptPass[3:15])

Loading…
Cancel
Save