Skip to main content

SelfTest

Trait SelfTest 

Source
pub trait SelfTest {
    // Required method
    fn self_test() -> Result<()>;
}
Expand description

A known-answer test an implementation runs to satisfy FIPS 140-3 CAST requirements.

Implemented by every approved algorithm so ic-fips can enumerate and drive the full self-test suite without hard-coding a list.

Required Methods§

Source

fn self_test() -> Result<()>

Run the algorithm’s known-answer test.

Returns crate::ErrorKind::SelfTestFailed if the computed value does not match the embedded vector.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§