[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

reversible fingerprint comment in membuffer code

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 19 May 2015 11:24:26 +0100

Is this comment in cache-membuffer.c:combine_key correct?

      /* scramble key DATA. All of this must be reversible to prevent key
       * collisions. So, we limit ourselves to xor and permutations. */
      data[1] = (data[1] << 27) | (data[1] >> 37);
      data[1] ^= data[0] & 0xffff;
      data[0] ^= data[1] & APR_UINT64_C(0xffffffffffff0000);

I don't see why this needs to be reversible, and it's not clear it is
reversible.

The comment was added in r1458643 on the cache-server branch
http://svn.apache.org/viewvc?view=revision&revision=r1458643

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2015-05-19 12:25:19 CEST

This is an archived mail posted to the Subversion Dev mailing list.