masking

package
v0.0.0-...-982e07a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataEncryptor

type DataEncryptor struct {
	// contains filtered or unexported fields
}

DataEncryptor performs partial encryption of plaintext in the cell

func NewMaskingDataEncryptor

func NewMaskingDataEncryptor(keystore keystore.DecryptionKeyStore, dataEncryptor encryptor.DataEncryptor) (*DataEncryptor, error)

NewMaskingDataEncryptor return new DataEncryptor

func (*DataEncryptor) EncryptWithClientID

func (e *DataEncryptor) EncryptWithClientID(clientID, data []byte, setting config.ColumnEncryptionSetting) ([]byte, error)

EncryptWithClientID mask data according to setting

type DataManipulator

type DataManipulator interface {
	ChangeData([]byte) ([]byte, error)
	UnchangeData([]byte) ([]byte, error)
}

DataManipulator interface for component which do something with data and return changed

type KeyStore

type KeyStore interface {
	keystore.PublicKeyStore
	GetServerDecryptionPrivateKeys(id []byte) ([]*keys.PrivateKey, error)
}

KeyStore interface with required methods from keystore for masking

type Masker

type Masker interface {
	Mask(data []byte, dataManipulator DataManipulator, plaintextLength int, side common.PlainTextSide) ([]byte, error)
	Unmask(data []byte, dataManipulator DataManipulator, plaintextLength int, maskingPattern []byte, side common.PlainTextSide) ([]byte, error)
}

Masker interface for masking/unmasking data

func NewMasker

func NewMasker(keystore KeyStore) (Masker, error)

NewMasker return new Masker

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

Processor implements DataProcessor interface and unmask matched data

func NewProcessor

func NewProcessor(decryptor base.ExtendedDataProcessor) (*Processor, error)

NewProcessor return new Processor for decryption masked data

func (*Processor) Process

func (processor *Processor) Process(data []byte, context *base.DataProcessorContext) ([]byte, error)

Process implement DataProcessor with AcraStruct decryption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL