You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/12/28 10:19:25 UTC

[GitHub] [commons-codec] aherbert commented on issue #34: Added javadoc messages concerning hash64 seed and sign extension.

aherbert commented on issue #34: Added javadoc messages concerning hash64 seed and sign extension.
URL: https://github.com/apache/commons-codec/pull/34#issuecomment-569404502
 
 
   I am 50/50 on this.
   
   I would not call it a bug when there is no reference hash64 implementation. This method is a port of a bad adaption of the hash128x86 method to output a 64-bit hash. So unlike the other method where it was a bug because the output was not the same as the reference implementation, this can be labelled as an implementation detail.
   
   The only real effect is that the initial hash will be xor'd with 1's instead of 0's for the upper 32-bits and if the seed is negative.
   
   Since we do not know about the statistical properties of this hash, it is not part of the original code and it is marked as deprecated then adding a lot of javadoc about sign-extension bugs which do not manifest (because the default seed is positive) to 5 deprecated methods seems like noise to me. 
   
   I would update the javadoc on the main method which accepts a seed to state that the seed is **not** treated as **unsigned**.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services