style: add error text

pull/92/head
ᴍᴏᴏɴD4ʀᴋ 3 years ago
parent 733311368a
commit 265b93e288
  1. 3
      core/decrypt/decrypt.go

@ -19,6 +19,7 @@ var (
errSecurityKeyIsEmpty = errors.New("input [security find-generic-password -wa 'Chrome'] in terminal")
errDecryptFailed = errors.New("decrypt failed, password is empty")
errDecodeASN1Failed = errors.New("decode ASN1 data failed")
errEncryptedLength = errors.New("length of encrypted password less than block size")
)
type ASN1PBE interface {
@ -164,7 +165,7 @@ func aes128CBCDecrypt(key, iv, encryptPass []byte) ([]byte, error) {
}
encryptLen := len(encryptPass)
if encryptLen < block.BlockSize() {
return nil, err
return nil, errEncryptedLength
}
dst := make([]byte, encryptLen)

Loading…
Cancel
Save