pub struct EncryptionChunkAdapter { /* private fields */ }Expand description
Encryption service adapter with required configuration
SECURITY: This adapter requires encryption configuration and key material to be provided explicitly. It will NOT create insecure default keys.
Implementations§
Source§impl EncryptionChunkAdapter
impl EncryptionChunkAdapter
Sourcepub fn new(
service: Arc<dyn EncryptionService>,
name: String,
config: EncryptionAdapterConfig,
) -> Self
pub fn new( service: Arc<dyn EncryptionService>, name: String, config: EncryptionAdapterConfig, ) -> Self
Creates a new encryption adapter with required configuration
§Security
- Requires explicit
EncryptionConfigwith algorithm settings - Requires explicit
KeyMaterial- will NOT generate insecure defaults - Validates configuration before accepting
§Arguments
service- The encryption service implementationname- Name for this adapter instanceconfig- Configuration including encryption settings and key material
Source§impl EncryptionChunkAdapter
impl EncryptionChunkAdapter
Sourcepub fn new_encryption_adapter(
service: Arc<dyn EncryptionService>,
name: Option<String>,
encryption_config: EncryptionConfig,
key_material: KeyMaterial,
) -> Self
pub fn new_encryption_adapter( service: Arc<dyn EncryptionService>, name: Option<String>, encryption_config: EncryptionConfig, key_material: KeyMaterial, ) -> Self
Creates a new encryption adapter with provided configuration
§Security
Caller MUST provide:
- Valid encryption configuration
- Secure key material (NOT zero-filled or weak keys)
§Arguments
service- The encryption service implementationname- Optional name for this adapter (defaults to “EncryptionAdapter”)encryption_config- Encryption algorithm and parameterskey_material- Cryptographic key material (must be secure!)
Trait Implementations§
Source§impl ChunkProcessor for EncryptionChunkAdapter
impl ChunkProcessor for EncryptionChunkAdapter
Source§fn process_chunk(&self, chunk: &FileChunk) -> Result<FileChunk, PipelineError>
fn process_chunk(&self, chunk: &FileChunk) -> Result<FileChunk, PipelineError>
Processes a single chunk of data and returns a new processed chunk Read more
Source§fn modifies_data(&self) -> bool
fn modifies_data(&self) -> bool
Returns whether this processor modifies chunk data
Source§fn requires_sequential_processing(&self) -> bool
fn requires_sequential_processing(&self) -> bool
Returns whether this processor requires sequential processing
Auto Trait Implementations§
impl Freeze for EncryptionChunkAdapter
impl !RefUnwindSafe for EncryptionChunkAdapter
impl Send for EncryptionChunkAdapter
impl Sync for EncryptionChunkAdapter
impl Unpin for EncryptionChunkAdapter
impl !UnwindSafe for EncryptionChunkAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more