redeem_invite

Function redeem_invite 

Source
pub fn redeem_invite(
    blob: &str,
    invite_password: &str,
) -> BpResult<InvitePayload>
Expand description

Decrypt, verify and parse an invite token.

Does not save anything to disk — call save_invite_key afterwards.

§Errors

Returns an error if:

  • The blob is malformed or truncated.
  • The password is wrong (ChaCha20-Poly1305 authentication fails).
  • The Ed25519 signature is invalid.
  • The token has expired.