-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
63 lines (47 loc) · 1.19 KB
/
errors.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package AtlasInsideAES
type InvalidPassphraseError struct {
Msg string
}
func (err *InvalidPassphraseError) Error() string {
return "Invalid encryption or decryption passphrase: " + err.Msg
}
type InvalidEncryptedDataError struct {
Msg string
}
func (err *InvalidEncryptedDataError) Error() string {
return "Invalid encrypted data: " + err.Msg
}
type CouldNotObtainRandomSaltError struct {
Msg string
}
func (err *CouldNotObtainRandomSaltError) Error() string {
return "Could not obtain random salt: " + err.Msg
}
type CouldNotObtainRandomIVError struct {
Msg string
}
func (err *CouldNotObtainRandomIVError) Error() string {
return "Could not obtain random IV: " + err.Msg
}
type InvalidAESKeyError struct {
Msg string
}
func (err *InvalidAESKeyError) Error() string {
return "Invalid AES key: " + err.Msg
}
type InvalidIVError struct {
Msg string
}
func (err *InvalidIVError) Error() string {
return "Invalid IV: " + err.Msg
}
type InvalidSaltError struct {
Msg string
}
func (err *InvalidSaltError) Error() string {
return "Invalid Salt: " + err.Msg
}
type IncorrectPassphraseError struct{}
func (err *IncorrectPassphraseError) Error() string {
return "Invalid decryption passphrase"
}