Skip to content

Commit

Permalink
internal/age: improve empty passphrase error message
Browse files Browse the repository at this point in the history
Fixes #62
  • Loading branch information
FiloSottile committed Dec 31, 2019
1 parent 1110c3b commit 7935150
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/age/scrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (*ScryptRecipient) Type() string { return "scrypt" }

func NewScryptRecipient(password string) (*ScryptRecipient, error) {
if len(password) == 0 {
return nil, errors.New("empty scrypt password")
return nil, errors.New("passphrase can't be empty")
}
r := &ScryptRecipient{
password: []byte(password),
Expand Down Expand Up @@ -87,7 +87,7 @@ func (*ScryptIdentity) Type() string { return "scrypt" }

func NewScryptIdentity(password string) (*ScryptIdentity, error) {
if len(password) == 0 {
return nil, errors.New("empty scrypt password")
return nil, errors.New("passphrase can't be empty")
}
i := &ScryptIdentity{
password: []byte(password),
Expand Down

0 comments on commit 7935150

Please sign in to comment.