fix: firefox for windows decrypt failure

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2020-07-10 10:46:33 +08:00
parent 206b53417f
commit 4f80bd0ca7
3 changed files with 8 additions and 7 deletions
+4 -1
View File
@@ -88,11 +88,14 @@ func decryptChromeKey(chromePass []byte) {
func DecryptChromePass(encryptPass []byte) (string, error) {
if len(encryptPass) > 3 {
if len(chromeKey) == 0 {
return "", errKeyIsEmpty
}
m, err := aes128CBCDecrypt(chromeKey, iv, encryptPass[3:])
return string(m), err
} else {
return "", &DecryptError{
err: passwordIsEmpty,
err: errPasswordIsEmpty,
}
}
}