Be more clear about the Base64 encoding of signatures and hashes.
This commit is contained in:
parent
8c102d11bb
commit
30f830bd5e
@ -160,7 +160,7 @@ where
|
|||||||
|
|
||||||
/// Creates a *content hash* for the JSON representation of an event.
|
/// Creates a *content hash* for the JSON representation of an event.
|
||||||
///
|
///
|
||||||
/// Returns the hash as a Base64-encoded string without padding.
|
/// Returns the hash as a Base64-encoded string, using the standard character set, without padding.
|
||||||
///
|
///
|
||||||
/// The content hash of an event covers the complete event including the unredacted contents. It is
|
/// 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.
|
/// used during federation and is described in the Matrix server-server specification.
|
||||||
@ -182,7 +182,7 @@ pub fn content_hash(value: &Value) -> Result<String, Error> {
|
|||||||
|
|
||||||
/// Creates a *reference hash* for the JSON representation of an event.
|
/// Creates a *reference hash* for the JSON representation of an event.
|
||||||
///
|
///
|
||||||
/// Returns the hash as a Base64-encoded string without padding.
|
/// 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
|
/// 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
|
/// hashes. It is used to generate event identifiers and is described in the Matrix server-server
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
//! algorithm it uses and a "version" string, separated by a colon. The version is an arbitrary
|
//! algorithm it uses and a "version" string, separated by a colon. The version is an arbitrary
|
||||||
//! identifier used to distinguish key pairs using the same algorithm from the same homeserver.
|
//! identifier used to distinguish key pairs using the same algorithm from the same homeserver.
|
||||||
//!
|
//!
|
||||||
|
//! In JSON representations, signatures and hashes appear as Base64-encoded strings, using the
|
||||||
|
//! standard character set, without padding.
|
||||||
|
//!
|
||||||
//! # Signing JSON
|
//! # Signing JSON
|
||||||
//!
|
//!
|
||||||
//! A homeserver signs JSON with a key pair:
|
//! A homeserver signs JSON with a key pair:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user