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::encode;
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, encode(&subkey));