Function ruma_signatures::sign_json

source ·
pub fn sign_json<K>(key_pair: &K, value: &Value) -> Result<Signature, Error>where
    K: KeyPair,
Expand description

Signs an arbitrary JSON object.

Parameters

  • key_pair: A cryptographic key pair used to sign the JSON.
  • value: A JSON object to be signed according to the Matrix specification.

Errors

Returns an error if the JSON value is not a JSON object.