blob: 0a3bb5489d77502ae96686cd81892006ee7c0af8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package internal
import "errors"
type (
KEK []byte
DEK []byte
WrappedDEK []byte
Ciphertext []byte
Salt []byte
)
type EncryptedDataPayload struct {
DEK WrappedDEK
Salt Salt
Payload Ciphertext
}
var (
aadWrapDEK = []byte("wrap:dek:v1")
aadDataMsg = []byte("data:msg:v1")
errBadKeyLn = errors.New("invalid key length: must be 16, 24, or 32 bytes")
)
|