Documentation ¶
Index ¶
Constants ¶
View Source
const (
// need to keep it exact same as in TiKV ENCRYPTION_VENDOR_NAME_AWS_KMS
EncryptionVendorNameAwsKms = "AWS"
)
View Source
const (
// need to keep it exactly same as TiKV STORAGE_VENDOR_NAME_GCP in TiKV
StorageVendorNameGcp = "gcp"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsKms ¶
type AwsKms struct {
// contains filtered or unexported fields
}
func NewAwsKms ¶
func NewAwsKms(masterKeyConfig *encryptionpb.MasterKeyKms) (*AwsKms, error)
func (*AwsKms) DecryptDataKey ¶
type CryptographyType ¶
type CryptographyType int
CryptographyType represents different cryptography methods
const ( CryptographyTypePlain CryptographyType = iota CryptographyTypeAesGcm256 )
func (CryptographyType) TargetKeySize ¶
func (c CryptographyType) TargetKeySize() int
type EncryptedKey ¶
type EncryptedKey []byte
EncryptedKey is used to mark data as an encrypted key
func NewEncryptedKey ¶
func NewEncryptedKey(key []byte) (EncryptedKey, error)
func (EncryptedKey) Equal ¶
func (e EncryptedKey) Equal(other *EncryptedKey) bool
Equal method for EncryptedKey
type GcpKms ¶
type GcpKms struct {
// contains filtered or unexported fields
}
func NewGcpKms ¶
func NewGcpKms(config *encryptionpb.MasterKeyKms) (*GcpKms, error)
func (*GcpKms) DecryptDataKey ¶
type PlainKey ¶
type PlainKey struct {
// contains filtered or unexported fields
}
PlainKey is used to mark a byte slice as a plaintext key
func NewPlainKey ¶
func NewPlainKey(key []byte, t CryptographyType) (*PlainKey, error)
func (*PlainKey) KeyTag ¶
func (p *PlainKey) KeyTag() CryptographyType
Click to show internal directories.
Click to hide internal directories.