Function ruma_signatures::reference_hash

source ·
pub fn reference_hash(
    value: &CanonicalJsonObject,
    version: &RoomVersionId
) -> Result<String, Error>
Expand description

Creates a reference hash for an event.

Returns the hash as a base64-encoded string, using the standard character set, without padding.

The reference hash of an event covers the essential fields of an event, including content hashes. It is used to generate event identifiers and is described in the Matrix server-server specification.


object: A JSON object to generate a reference hash for.


Returns an error if the event is too large or redaction fails.