Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataCompressor ¶
type DataCompressor interface { Decompress(input []byte) ([]byte, error) Compress(input []byte) ([]byte, error) }
func NewCompressor ¶
func NewCompressor(algo string) DataCompressor
type DataProtector ¶
type DataProtector struct {
// contains filtered or unexported fields
}
func NewDataProtector ¶
func NewDataProtector( keyEncryptor encDec, cryptoKeyID string, dataEncryptor dataEncryptor, dataCompressor DataCompressor, ) *DataProtector
func (*DataProtector) Decrypt ¶
func (d *DataProtector) Decrypt(_ context.Context, data *EncryptedData) ([]byte, error)
func (*DataProtector) Encrypt ¶
func (d *DataProtector) Encrypt(_ context.Context, msg []byte) (*EncryptedData, error)
type EncryptedData ¶
type GZip ¶
type GZip struct { }
type NilDataProtector ¶ added in v1.6.0
type NilDataProtector struct { }
func NewNilDataProtector ¶ added in v1.6.0
func NewNilDataProtector() *NilDataProtector
func (*NilDataProtector) Decrypt ¶ added in v1.6.0
func (n *NilDataProtector) Decrypt(_ context.Context, encryptedData *EncryptedData) ([]byte, error)
func (*NilDataProtector) Encrypt ¶ added in v1.6.0
func (n *NilDataProtector) Encrypt(_ context.Context, msg []byte) (*EncryptedData, error)
Click to show internal directories.
Click to hide internal directories.