Function ruma_signatures::sign_json
[−]
[src]
pub fn sign_json<K>(key_pair: &K, value: &Value) -> Result<Signature, Error> where
K: KeyPair,
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.