Skip to main content

content_hash

Function content_hash 

Source
pub fn content_hash(
    object: &BTreeMap<String, CanonicalJsonValue>,
) -> Result<Base64<Standard, [u8; 32]>, JsonError>
Available on crate feature signatures only.
Expand description

Computes the content hash of the given event.

The content hash of an event covers the complete event including the unredacted contents. It is used during federation and is described in the Matrix server-server specification.

§Parameters

  • object: A JSON object to generate a content hash for.

§Errors

Returns an error if the event is too large.