From d3cc6bcf9dc8aa534edbd9e3cb52761a2470630d Mon Sep 17 00:00:00 2001 From: Jonas Wielicki Date: Mon, 26 Feb 2018 08:11:18 +0100 Subject: [PATCH] XEP-0153: Clarify encoding of update hash --- xep-0153.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xep-0153.xml b/xep-0153.xml index 4e32e0d8..6129dd94 100644 --- a/xep-0153.xml +++ b/xep-0153.xml @@ -26,6 +26,12 @@ http://www.xmpp.org/schemas/vcard-avatar.xsd &stpeter; + + 1.1 + 2018-02-26 + jwi + Clarify encoding of the photo hash in the presence update. + 1.0 2006-08-16 @@ -110,14 +116,15 @@ ]]> -

Next, the user's client computes the SHA1 hash of the avatar image data itself (not the base64-encoded version) in accordance with &rfc3174;. This hash is then included in the user's presence information as the XML character data of the <photo/> child of an &X; element qualified by the 'vcard-temp:x:update' namespace, as shown in the following example:

+

Next, the user's client computes the SHA1 hash of the avatar image data itself (not the base64-encoded version) in accordance with &rfc3174;. This hash is then included in the user's presence information. This is done by putting the hash encoded as hexadecimal digits as the XML character data of the <photo/> child of an &X; element qualified by the 'vcard-temp:x:update' namespace, as shown in the following example:

- sha1-hash-of-image + 01b87fcd030b72895ff8e88db57ec525450f000d ]]> +

Note that while XML Schema defines the canonical representation of hexadecimal values to be upper-case, the historical use throughout the XMPP ecosystem has established lower-case use. Entities need to be able to process both and may prefer to emit lower-case for compatibility.

The user's server then broadcasts that presence information to all contacts who are subscribed to the user's presence information.

@@ -270,7 +277,7 @@ - +