Available on crate feature
protected only.Expand description
§Protected memory type aliases for HKDF
This mod provides protected-memory PRK aliases and locked HKDF aliases. Use these aliases when the extracted PRK or expanded output should stay in locked memory.
use dryoc::hkdf::HkdfSha512Expander;
use dryoc::hkdf::protected::*;
let ikm = HeapBytes::from_slice_into_readonly_locked(b"Truth will come to light.")
.expect("ikm failed");
let hkdf: LockedHkdfSha512 = HkdfSha512Expander::extract(None::<&[u8]>, &ikm);
let output: Locked<HeapBytes> = hkdf.expand_to_bytes(64, b"context").expect("expand failed");
assert_eq!(output.len(), 64);Re-exports§
pub use crate::protected::*;
Type Aliases§
- Hkdf
Sha256 Prk - Heap-allocated, page-aligned pseudorandom key for HKDF-SHA-256.
- Hkdf
Sha512 Prk - Heap-allocated, page-aligned pseudorandom key for HKDF-SHA-512.
- Locked
Hkdf Sha256 - Locked HKDF-SHA-256 expander.
- Locked
Hkdf Sha512 - Locked HKDF-SHA-512 expander.