package
0.0.0-20240917120716-8843776e9f3a
Repository: https://github.com/cossacklabs/acra.git
Documentation: pkg.go.dev

# Functions

DeserializeEncryptedData derive internal container.
ExtractSerializedContainer retrieve length of wrapping container.
GetHandlerByEnvelopeID return ContainerHandler from storage by its envelopID.
GetHandlerByName return ContainerHandler from storage by its name.
InitRegistry initialize registry singleton we can't initialize it in init function because AcraBlock/AcraStruct handlers should be able to access theirs KeyStores in runtime but KeyStore is initialized in main.go.
NewAcraBlockHandler construct new AcraBlockHandler with keystore.
NewAcraStructHandler construct new AcraStructHandler with keystore.
NewDecryptHandler construct new DecryptHandler with keystore and DataProcessor.
NewEncryptHandler construct new EncryptHandler for CryptoEnvelopeType with RegistryHandler.
NewEnvelopeDetector construct new EnvelopeDetector with list of callback.
NewEnvelopeMatcher return initialized EnvelopeMatcher.
NewOldContainerDetectorWrapper construct new OldContainerDetectorWrapper with provided EnvelopeDetector.
NewPoisonRecordKeyStoreWrapper construct new PoisonRecordKeyStoreWrapper.
NewPoisonRecordsRecognizer construct new PoisonRecordDetector.
NewPrometheusContainerHandlerWrapper create new ContainerHandler prometheus wrapper.
NewReEncryptHandler construct new RegistryHandler struct with encryptor.EmptyCheckFunction as SkipEncryptionFunc.
NewRegistryHandler construct new RegistryHandler struct with encryptor.EmptyCheckFunction as SkipEncryptionFunc.
Register public API allows registering other handlers from other packages.
SerializeEncryptedData wraps encrypted data in new format container.

# Constants

AcraBlockEnvelopeID represent AcraBlock EnvelopeID will be serialized inside CryptoContainer.
AcraStructEnvelopeID represent AcraBlock EnvelopeID will be serialized inside CryptoContainer.
Serialized container meta info constants.
Serialized container meta info constants.
Serialized container meta info constants.
Serialized container meta info constants.
TagSymbol used in begin of serialized container.

# Variables

Errors related to crypto handlers.
RegistryHandler related errors.
Registry related errors.
Registry related errors.
RegistryHandler related errors.
RegistryHandler related errors.
RegistryHandler related errors.
RegistryHandler related errors.
RegistryHandler related errors.
TagBegin represents begin sequence of bytes for serialized container.

# Structs

AcraBlockHandler AcraBlock implementation of ContainerHandler interface.
AcraStructHandler AcraStruct implementation of ContainerHandler interface.
DecryptHandler implements EnvelopeCallbackHandler as EnvelopeDetector callback for simple decryption processing.
EncryptHandler wraps RegistryHandler as standalone CryptoEnvelope encryptor.
EnvelopeDetector try to find serialized container in data block and map it to its internal callbacks list.
EnvelopeMatcher match CryptoEnvelope signatures in data blobs.
OldContainerDetectorWrapper wraps EnvelopeDetector with additional functionality for tracking raw AcraStructs or AcraBlock for saving backward compatibility.
PoisonRecordDetector implements EnvelopeCallbackHandler as EnvelopeDetector callback for detection of poison records.
PoisonRecordKeyStoreWrapper is wrapper of keystore.PrivateKeyStore UnderTheHood goal is to escape duplication of code for processing data as for simple decryption and for poison record processing so that, to reuse common behaviour but with different decryption keys we need to use keystore.RecordProcessorKeyStore methods as keystore.PrivateKeyStore because keystore.PrivateKeyStore is used inside base.DataProcessorContext which is required parameter for ContainerHandler.Process method.
PrometheusContainerHandlerWrapper wraps ContainerHandler with adding prometheus metrics logic.
ReEncryptHandler wraps RegistryHandler with functionality of re-encryption AcraStruct to AcraBlock.
RegistryHandler implements CryptoContainerHandler that implements DataEncryptor/DataProcessor interfaces and may be used by OnBind/OnQuery/OnColumn subscribers (masking, transparent decryption ) to encrypt/decrypt data and uses private registry.

# Interfaces

ContainerHandler represent container handler interface used as encryptor/decryptor/processor.
EnvelopeCallbackHandler define callback method that called on each found serialized container.
Registry interface abstraction over crypto registry for keeping correspondence between ContainerHandlers and their IDs.