Skip to main content

classify_algorithm_names

Function classify_algorithm_names 

Source
pub fn classify_algorithm_names(name: &str) -> Vec<AlgorithmClassification>
Expand description

Extract every recognizable algorithm mention from a free-form name using word-boundary token matching (never bare substrings). Used for cipher-suite names (“TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256”) and as the guarded name-based fallback for assets without algorithmFamily/OID.

Tokens are split on any non-alphanumeric character (keeping + for “SPHINCS+”); spans of up to three adjacent tokens are joined with - and matched longest-first, so “ML KEM 1024” and “AES 128” resolve as units. Unrecognized tokens (GCM, CBC, TLS, WITH, …) are simply skipped.