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§
fn scheme(&self) -> EncryptionScheme
Sourcefn open(&self, creds: &dyn CredentialSource) -> VfsResult<DynSource>
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".