pub fn encode_shares(
tag: Tag,
threshold: Threshold,
n: usize,
secret: &Payload,
) -> Result<Vec<String>>Expand description
Split a secret (entr or mnem) into n codex32 K-of-N shares.
threshold == ZERO:nMUST be 1; returns a single string byte-identical toencode(tag, secret)— the v0.1 single-string construction (from_seed(HRP, 0, tag, Fe::S, [prefix]||payload), deterministic). Theidstays the typetag(NOT random) — load-bearing for byte-identity.threshold == k ∈ 2..=9: validatek <= n <= 31(elseInvalidShareCount). A random 4-charid(not inRESERVED_ID_BLOCKLIST) keys the share-set. The secret-at-S (Fe::S) holds the real payload;k-1random defining shares at fixed canonical non-sindices +interpolate_atfor the remainingn-(k-1)indices produce thendistributed shares. The secret-at-S is NEVER returned (it is the recovery target only).
Works identically for entr and mnem (byte-agnostic); language survives a
mnem split (it rides the secret-at-S wire bytes).