mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-25 06:03:57 +03:00
src/backup/data_blob.rs: add is_encrypted helper
This commit is contained in:
parent
6fd129844d
commit
c0fa14d94a
@ -271,6 +271,12 @@ impl DataBlob {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns if chunk is encrypted
|
||||
pub fn is_encrypted(&self) -> bool {
|
||||
let magic = self.magic();
|
||||
magic == &ENCR_COMPR_BLOB_MAGIC_1_0 || magic == &ENCRYPTED_BLOB_MAGIC_1_0
|
||||
}
|
||||
|
||||
/// Verify digest and data length for unencrypted chunks.
|
||||
///
|
||||
/// To do that, we need to decompress data first. Please note that
|
||||
|
Loading…
x
Reference in New Issue
Block a user