Skip to main content

token_matches

Function token_matches 

Source
pub(crate) fn token_matches<'a>(
    tokens: impl IntoIterator<Item = &'a String>,
    presented: &str,
) -> bool
Expand description

Constant-time token check (S15): every accepted token is compared, and each comparison folds over all bytes, so timing reveals neither which token matched nor the length of a matching prefix.