From cab807734f8aaef23d21fe9323a11593a2e982ac Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 26 Nov 2020 14:27:12 +0000 Subject: [PATCH] Base64 not hex --- proposals/2836-threading.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/2836-threading.md b/proposals/2836-threading.md index 820c7826..2a11b830 100644 --- a/proposals/2836-threading.md +++ b/proposals/2836-threading.md @@ -193,7 +193,7 @@ The proposed API so far has no mechanism to: To aid this, all events returned from `/event_relationships` SHOULD have 2 additional fields in the `unsigned` section of the event: - `children`: A map of `rel_type` to the number of children with that relation. - - `children_hash`: The SHA256 of all the event IDs of the known children, deduplicated and sorted lexicographically. + - `children_hash`: The base64 string of the SHA256 of all the event IDs of the known children, deduplicated and sorted lexicographically. For example, an event `$AAA` with three children: `$BBB`, `$CCC`, `$DDD` where the first two are of `rel_type` "m.reference" and the last is "custom", should produce an `unsigned` section of: @@ -203,7 +203,7 @@ unsigned: { "m.reference": 2, "custom": 1 }, - children_hash: "184e901fca089a2abc228330426203c45f647aab58d90eca2ad27871a5dd61bd" // SHA256("$BBB$CCC$DDD") + children_hash: "GE6QH8oImiq8IoMwQmIDxF9keqtY2Q7KKtJ4caXdYb0=" // base64(SHA256("$BBB$CCC$DDD")) } ```