Available on crate feature
nightly
only.Expand description
§Protected memory type aliases for Kdf
This mod provides re-exports of type aliases for protected memory usage
with Kdf
. These type aliases are provided for
convenience.
§Example
use base64::engine::general_purpose;
use base64::Engine as _;
use dryoc::kdf::protected::*;
use dryoc::kdf::Kdf;
// Randomly generate a main key and context, using locked memory
let key: LockedKdf = Kdf::gen();
let subkey_id = 0;
let subkey: Locked<Key> = key.derive_subkey(subkey_id).expect("derive failed");
println!(
"Subkey {}: {}",
subkey_id,
general_purpose::STANDARD.encode(&subkey)
);
Re-exports§
pub use crate::protected::*;