internal/age: improve empty passphrase error message

Fixes #62
This commit is contained in:
Filippo Valsorda
2019-12-31 14:01:57 +01:00
parent 1110c3b6e1
commit 7935150f35

View File

@@ -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),
@@ -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),