Skip to main content

payload_segment

Function payload_segment 

Source
pub fn payload_segment(tag: &str, token: &str) -> Result<Vec<u8>, MacTokenError>
Expand description

The payload bytes of a token whose MAC has not been checked, for the family named by tag.

The value is caller-controlled and must never decide anything. Two uses are legitimate: rejecting a string that is not a token of this family before asking for anything else, and naming a local artefact after a token this process could not have minted.