tape: clear encryption key after backup (for security reasons)

This commit is contained in:
Dietmar Maurer 2021-04-08 10:37:49 +02:00
parent 973e985d73
commit fad95a334a

View File

@ -661,6 +661,14 @@ impl SgTape {
} }
} }
impl Drop for SgTape {
fn drop(&mut self) {
// For security reasons, clear the encryption key
let _ = self.set_encryption(None);
}
}
pub struct SgTapeReader<'a> { pub struct SgTapeReader<'a> {
sg_tape: &'a mut SgTape, sg_tape: &'a mut SgTape,
} }