Skip to content

Commit ae74b61

Browse files
committed
cmd/age,internal/stream: improve error messages
1 parent f882f40 commit ae74b61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/age/age.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func main() {
181181
}
182182
if armorFlag {
183183
errorWithHint("-a/--armor can't be used with -d/--decrypt",
184-
"note that armored files are detected automatically")
184+
"note that armored files are detected automatically, try again without -a/--armor")
185185
}
186186
if passFlag {
187187
errorWithHint("-p/--passphrase can't be used with -d/--decrypt",

internal/stream/stream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (r *Reader) readChunk() (last bool, err error) {
118118
out, err = r.a.Open(outBuf, r.nonce[:], in, nil)
119119
}
120120
if err != nil {
121-
return false, errors.New("failed to decrypt and authenticate payload chunk")
121+
return false, errors.New("failed to decrypt and authenticate payload chunk, file may be corrupted or tampered with")
122122
}
123123

124124
incNonce(&r.nonce)

0 commit comments

Comments
 (0)