-
Notifications
You must be signed in to change notification settings - Fork 9
/
error.go
24 lines (22 loc) · 1.46 KB
/
error.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package password
import "errors"
var (
// ErrCiphertextVer indicates version sub-string mismatch normally; ex. "secBoxv1"
ErrCiphertextVer = errors.New("Nonmatched ciphertext version")
// ErrCiphertextFormat indicates input is not in expected format
ErrCiphertextFormat = errors.New("Ciphertext input format not as expected")
// ErrInvalidVersionUpdate indicates new version given not oldVersion + 1 or greater
ErrInvalidVersionUpdate = errors.New("Invalid new version int, new master passphrase version must be greater than previous")
// ErrPassphraseHashMismatch indicates invalid passphrase for supplied ciphertext
ErrPassphraseHashMismatch = errors.New("Passphrase hash does not match supplied ciphertext")
// ErrPassphraseLength indicates supplied passphrase is not at least MinLength
ErrPassphraseLength = errors.New("Passphrase must be at least MinLength")
// ErrSecretBoxDecryptFail indicates SecretBox decryption could not be completed
ErrSecretBoxDecryptFail = errors.New("SecretBox decryption failed")
// ErrScryptParamN indicates ScryptParams:N out of acceptable range
ErrScryptParamN = errors.New("Given Scrypt (N) cost factor out of acceptable range")
// ErrScryptParamR indicates ScryptParams:r out of acceptable range
ErrScryptParamR = errors.New("Given Scrypt (r) cost factor out of acceptable range")
// ErrScryptParamP indicates ScryptParams:p out of acceptable range
ErrScryptParamP = errors.New("Given Scrypt (p) cost factor out of acceptable range")
)