tape: generate random encryptions keys and store key_config on media

This commit is contained in:
Dietmar Maurer
2021-01-19 06:19:18 +01:00
parent 8ca37d6a65
commit feb1645f37
10 changed files with 402 additions and 87 deletions

View File

@ -30,7 +30,7 @@ impl Default for Kdf {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Deserialize, Serialize, Clone, Debug)]
pub enum KeyDerivationConfig {
Scrypt {
n: u64,
@ -82,7 +82,7 @@ impl KeyDerivationConfig {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct KeyConfig {
pub kdf: Option<KeyDerivationConfig>,
#[serde(with = "proxmox::tools::serde::epoch_as_rfc3339")]