pub fn parse_invite(blob: &str) -> Result<Invite>Expand description
Decodes and verifies an invite blob.
Verification is mandatory and total: an invite that fails any check is an error, never a partially-trusted value. In order, cheap before expensive:
- base64url decodes, and the blob is structurally complete;
v == 1and no unknown flag bits;- the address parses in canonical form;
- the petname, when present, is displayable (no
Cc, noCf); derive_address(public_key) == address;- the signature, when present, verifies under
public_key.
ยงErrors
Returns MlsError::InvalidMessage for a malformed or truncated blob,
MlsError::VerificationFailed when the address does not derive from the
key or a present signature does not verify.