mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-23 19:14:01 +02:00
refactor: remove unused err message
This commit is contained in:
@@ -1,20 +1,9 @@
|
||||
package decrypter
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
var (
|
||||
errSecurityKeyIsEmpty = errors.New("input [security find-generic-password -wa 'Chrome'] in terminal")
|
||||
)
|
||||
|
||||
func Chromium(key, encryptPass []byte) ([]byte, error) {
|
||||
if len(encryptPass) <= 3 {
|
||||
return nil, errPasswordIsEmpty
|
||||
}
|
||||
if len(key) == 0 {
|
||||
return nil, errSecurityKeyIsEmpty
|
||||
}
|
||||
|
||||
iv := []byte{32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}
|
||||
return aes128CBCDecrypt(key, iv, encryptPass[3:])
|
||||
|
||||
@@ -11,9 +11,6 @@ func Chromium(key, encryptPass []byte) ([]byte, error) {
|
||||
if len(encryptPass) < 3 {
|
||||
return nil, errPasswordIsEmpty
|
||||
}
|
||||
if len(key) == 0 {
|
||||
return nil, errSecurityKeyIsEmpty
|
||||
}
|
||||
|
||||
return aesGCMDecrypt(encryptPass[15:], key, encryptPass[3:15])
|
||||
}
|
||||
@@ -22,9 +19,6 @@ func ChromiumForYandex(key, encryptPass []byte) ([]byte, error) {
|
||||
if len(encryptPass) < 3 {
|
||||
return nil, errPasswordIsEmpty
|
||||
}
|
||||
if len(key) == 0 {
|
||||
return nil, errSecurityKeyIsEmpty
|
||||
}
|
||||
// remove Prefix 'v10'
|
||||
// gcmBlockSize = 16
|
||||
// gcmTagSize = 16
|
||||
|
||||
Reference in New Issue
Block a user