Available on crate feature
protected only.Expand description
§Protected memory type aliases for HMAC
This mod provides protected-memory aliases for HMAC keys and MACs. Use these aliases when key material or authentication tags should live in locked memory.
use dryoc::hmac::HmacSha256;
use dryoc::hmac::protected::*;
let key = HmacSha256Key::generate_readonly_locked().expect("key failed");
let input = HeapBytes::from_slice_into_readonly_locked(b"More matter, with less art.")
.expect("input failed");
let mac: Locked<HmacSha256Mac> = HmacSha256::compute(key, &input);Re-exports§
pub use crate::protected::*;
Type Aliases§
- Hmac
Sha256 Key - Heap-allocated, page-aligned key for HMAC-SHA-256.
- Hmac
Sha256 Mac - Heap-allocated, page-aligned MAC for HMAC-SHA-256.
- Hmac
Sha512 Key - Heap-allocated, page-aligned key for HMAC-SHA-512.
- Hmac
Sha512 Mac - Heap-allocated, page-aligned MAC for HMAC-SHA-512.
- Hmac
Sha512256 Key - Heap-allocated, page-aligned key for HMAC-SHA-512-256.
- Hmac
Sha512256 Mac - Heap-allocated, page-aligned MAC for HMAC-SHA-512-256.