Yes, 
sure ... I think one can re-factor that much nicer in the way you propose.

Shouldn't be the XOR operation of buffers a member function of bufferlist? My question is, that I don't know if it is OK to touch common classes, since it might imply some danger ;-)