Skip to main content

read_split_tokens

Function read_split_tokens 

Source
fn read_split_tokens(
    ns: &str,
) -> Result<Option<(MuxBusTokens, String)>, StoreError>
Expand description

Read the three split-entry (chunked) tokens. Ok(None) means none of the three fields exist yet (not migrated to this layout — caller falls through to the legacy-blob / legacy-plaintext sources). Err means a read itself failed (locked keychain, no Secret Service daemon, permission denied — not just “no entry”), which the caller may still recover from via a legacy fallback. Returns the tokens plus the generation stamp shared by all three fields (validated equal below) — callers that need to compare this layout’s freshness against a coexisting blob use the second element; callers that don’t (the common case) just ignore it.