Skip to main content

initialize_with_profile

Function initialize_with_profile 

Source
pub fn initialize_with_profile(
    integrity: &[KatEntry],
    tests: &[KatEntry],
    profile: AlgorithmProfile,
) -> Result<(), Error>
Expand description

Initializes the module with a specific algorithm profile and runs every supplied power-up KAT.

This is the profile-aware entry point. It stores the selected profile before running KATs, then transitions to Operational on success. KATs always run all algorithms regardless of the profile — the profile only restricts post-initialization service access via require_allowed.

See initialize_with_tests for the backward-compatible wrapper that uses AlgorithmProfile::Unrestricted.