Skip to content

Commit

Permalink
fix chrome for windows decrypt error. Close #21
Browse files Browse the repository at this point in the history
  • Loading branch information
moonD4rk committed Jul 29, 2020
1 parent 448a5d4 commit 59f4c67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/decrypt/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/decrypt/decrypt_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 59f4c67

Please sign in to comment.