Skip to main content

check_onetime_key

Function check_onetime_key 

Source
fn check_onetime_key(
    should_be_fallback: ShouldBeFallback,
    otk: &SignedKey,
) -> Result<(), InputJsonError>
Expand description

Performs various checks on a [OneTimeKey].

ยงErrors

This function returns a BadJson error for any of the following cases:

  • The fallback field is missing or not equal to true when the key is supposed to be a fallback key.
  • The fallback field is present and set to true when the key is supposed to be a one-time key.