pub struct KatEntry {
pub name: &'static str,
pub run: fn() -> Result<(), SelfTestFailure>,
}Expand description
A power-up KAT registered with the module.
Algorithm crates expose one or more KatEntry values that the
top-level caller passes into initialize_with_tests at startup.
The runner executes every entry sequentially before the module
leaves the SelfTest state; a single failure latches the module
into Error for the remainder of the process lifetime, per
FIPS 140-3 Section 7.10 and SP 800-140B.
The function pointer signature takes no inputs on purpose: a KAT must run against compile-time-baked vectors only, never against caller-supplied data.
Fields§
§name: &'static strStable identifier for the test. Surfaces in
Error::SelfTestFailed and audit logs. Must match the
SelfTest::NAME used for the underlying vector.
run: fn() -> Result<(), SelfTestFailure>The test routine itself.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KatEntry
impl RefUnwindSafe for KatEntry
impl Send for KatEntry
impl Sync for KatEntry
impl Unpin for KatEntry
impl UnsafeUnpin for KatEntry
impl UnwindSafe for KatEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more