mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-23 19:14:01 +02:00
style: add error text
This commit is contained in:
@@ -19,6 +19,7 @@ var (
|
|||||||
errSecurityKeyIsEmpty = errors.New("input [security find-generic-password -wa 'Chrome'] in terminal")
|
errSecurityKeyIsEmpty = errors.New("input [security find-generic-password -wa 'Chrome'] in terminal")
|
||||||
errDecryptFailed = errors.New("decrypt failed, password is empty")
|
errDecryptFailed = errors.New("decrypt failed, password is empty")
|
||||||
errDecodeASN1Failed = errors.New("decode ASN1 data failed")
|
errDecodeASN1Failed = errors.New("decode ASN1 data failed")
|
||||||
|
errEncryptedLength = errors.New("length of encrypted password less than block size")
|
||||||
)
|
)
|
||||||
|
|
||||||
type ASN1PBE interface {
|
type ASN1PBE interface {
|
||||||
@@ -164,7 +165,7 @@ func aes128CBCDecrypt(key, iv, encryptPass []byte) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
encryptLen := len(encryptPass)
|
encryptLen := len(encryptPass)
|
||||||
if encryptLen < block.BlockSize() {
|
if encryptLen < block.BlockSize() {
|
||||||
return nil, err
|
return nil, errEncryptedLength
|
||||||
}
|
}
|
||||||
|
|
||||||
dst := make([]byte, encryptLen)
|
dst := make([]byte, encryptLen)
|
||||||
|
|||||||
Reference in New Issue
Block a user