pub struct BackupEncryption { /* private fields */ }Expand description
Backup encryption manager for securing backup data at rest
Implementations§
Source§impl BackupEncryption
impl BackupEncryption
pub fn new(config: BackupConfig) -> Self
Sourcepub async fn initialize(&self) -> Result<()>
pub async fn initialize(&self) -> Result<()>
Initialize the backup encryption system
Sourcepub async fn encrypt_file(&self, file_path: &Path) -> Result<EncryptionMetadata>
pub async fn encrypt_file(&self, file_path: &Path) -> Result<EncryptionMetadata>
Encrypt a backup file
Sourcepub async fn decrypt_file(
&self,
encrypted_path: &Path,
output_path: &Path,
) -> Result<()>
pub async fn decrypt_file( &self, encrypted_path: &Path, output_path: &Path, ) -> Result<()>
Decrypt a backup file
Sourcepub async fn encrypt_backup_in_place(
&self,
backup_path: &Path,
) -> Result<EncryptionMetadata>
pub async fn encrypt_backup_in_place( &self, backup_path: &Path, ) -> Result<EncryptionMetadata>
Encrypt backup in place (replaces original with encrypted version)
Sourcepub async fn generate_encryption_key(&self) -> Result<EncryptionKey>
pub async fn generate_encryption_key(&self) -> Result<EncryptionKey>
Generate a new encryption key
Sourcepub async fn rotate_encryption_key(&self) -> Result<EncryptionKey>
pub async fn rotate_encryption_key(&self) -> Result<EncryptionKey>
Rotate encryption keys
Sourcepub async fn verify_encryption_key(&self) -> Result<bool>
pub async fn verify_encryption_key(&self) -> Result<bool>
Verify encryption key integrity
Auto Trait Implementations§
impl Freeze for BackupEncryption
impl RefUnwindSafe for BackupEncryption
impl Send for BackupEncryption
impl Sync for BackupEncryption
impl Unpin for BackupEncryption
impl UnwindSafe for BackupEncryption
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