Skip to main content

validate_phrase

Function validate_phrase 

Source
pub fn validate_phrase(bytes: &[u8]) -> Result<(), PhraseRefusal>
Expand description

The rule. ORDER MATTERS and is the spec’s: empty, printable ASCII, ms1-shape (BEFORE the cap, so a grouped plate string gets the --in remedy and not “too long”), the cap, 64-hex.

It changes nothing: no trim, no case fold, no normalisation. The shape test works on a copy.