-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrors.go
More file actions
19 lines (13 loc) · 841 Bytes
/
Copy patherrors.go
File metadata and controls
19 lines (13 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package fast
import "errors"
// ErrInvalidKeySize is returned when the provided key is not 16, 24, or 32 bytes.
var ErrInvalidKeySize = errors.New("fast: invalid key size, must be 16, 24, or 32 bytes")
// ErrInvalidRadix is returned when the radix is outside the supported range [2, 256].
var ErrInvalidRadix = errors.New("fast: invalid radix, must be between 2 and 256")
// ErrInvalidWordLength is returned when the word length is too small.
var ErrInvalidWordLength = errors.New("fast: invalid word length, must be >= 2")
// ErrInvalidParams is returned when cipher parameters are inconsistent.
var ErrInvalidParams = errors.New("fast: invalid parameters")
// MaxDataSize is the maximum supported data size for encryption/decryption.
// This limit ensures reasonable performance and memory usage.
const MaxDataSize = 1 << 20 // 1 MB