On Fri, 15 Aug 2008 20:35:52 -0600
Peter Saint-Andre <[EMAIL PROTECTED]> wrote:

> Peter Saint-Andre wrote:
> > Zenon Kuder jr. wrote:
> >> Actually the idea (I talked with Pavel by IM a bit) is that client
> >> a) either uses hash, checks the incoming data and caches per hash
> >> or b) doesn't know the hash or hash wasn't used or doesn't support 
> >> hashes and then caches per JID and per the unique string.
> >>
> >> I hope I got it right and clear :-).
> > 
> > Yes, that seems good.
> 
> We might even want to harmonize BoB with User Avatar (XEP-0084).
> There we have:
> 
> <metadata xmlns='urn:xmpp:avatar:metadata'>
>    <info bytes='size-of-image-data-in-bytes'
>          height='image-height-in-pixels'
>          id='SHA-1-hash-of-image-data'
>          type='content-type-of-image-data'
>          url='HTTP-URL-for-image-data'
>          width='image-width-in-pixels'/>
> </metadata>
> 
> So hashes of user avatar images could be compared against BoB data,
> too (without changing XEP-0084, unless we want to add a 'cid'
> attribute there).

Not sure if this is useful.

But what we need to do is both specify the metadata format... and to
specify how we compute the hash.

I propose (as a possibility):

For sha-1: h = sha-1

Generally: hashed_value = h( h(content-type) + h(content) )
where + stands for concatenation.

If we include the metadata, it would be good to add it to the hash too
(just as we concatenated hashes of content-type and content) in some
way.

This would ensure we get the same type, data and metadata for a
particular hash :) which is nice ;).

Pavel

> /psa


-- 

Web: http://www.pavlix.net/
Jabber & Mail: pavlix(at)pavlix.net
OpenID: pavlix.net

Reply via email to