Function ruma_signatures::reference_hash[][src]

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 redaction fails.