Skip to main content

EncryptionLayer

Trait EncryptionLayer 

Source
pub trait EncryptionLayer: Send + Sync {
    // Required methods
    fn scheme(&self) -> EncryptionScheme;
    fn open(&self, creds: &dyn CredentialSource) -> VfsResult<DynSource>;
}
Expand description

An encryption translation over one crate::ImageSource: consumes credentials + ciphertext sectors, presents a decrypted DynSource.

Required Methods§

Source

fn scheme(&self) -> EncryptionScheme

Source

fn open(&self, creds: &dyn CredentialSource) -> VfsResult<DynSource>

Present the decrypted volume. Errs NeedCredentials if keys are absent, Decode (loud, with the header bytes) on a bad key / unsupported cipher.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§