You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/12/28 16:22:39 UTC

[commons-codec] branch master updated: Added javadoc messages concerning hash64 seed and sign extension. (#34)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new e918527  Added javadoc messages concerning hash64 seed and sign extension. (#34)
e918527 is described below

commit e91852735aae750523ab6e425c3b31e9653d6934
Author: Claude Warren <cl...@xenei.com>
AuthorDate: Sat Dec 28 16:22:33 2019 +0000

    Added javadoc messages concerning hash64 seed and sign extension. (#34)
---
 .../org/apache/commons/codec/digest/MurmurHash3.java   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
index 31433fb..3577bfb 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -428,6 +428,9 @@ public final class MurmurHash3 {
      * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code long}.
      * This method will be removed in a future release.</p>
      *
+     * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect
+     * this result as the default seed is positive.<p>
+     *
      * <p>This is a helper method that will produce the same result as:</p>
      *
      * <pre>
@@ -471,6 +474,9 @@ public final class MurmurHash3 {
      * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code int}.
      * This method will be removed in a future release.</p>
      *
+     * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect
+     * this result as the default seed is positive.<p>
+     *
      * <p>This is a helper method that will produce the same result as:</p>
      *
      * <pre>
@@ -512,6 +518,9 @@ public final class MurmurHash3 {
      * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code short}.
      * This method will be removed in a future release.</p>
      *
+     * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect
+     * this result as the default seed is positive.<p>
+     *
      * <p>This is a helper method that will produce the same result as:</p>
      *
      * <pre>
@@ -555,6 +564,9 @@ public final class MurmurHash3 {
      * {@linkplain #hash128x64(byte[])} with the same byte data.
      * This method will be removed in a future release.</p>
      *
+     * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect
+     * this result as the default seed is positive.<p>
+     *
      * <p>This is a helper method that will produce the same result as:</p>
      *
      * <pre>
@@ -584,6 +596,9 @@ public final class MurmurHash3 {
      * {@linkplain #hash128x64(byte[])} with the same byte data.
      * This method will be removed in a future release.</p>
      *
+     * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect
+     * this result as the default seed is positive.<p>
+     *
      * <p>This is a helper method that will produce the same result as:</p>
      *
      * <pre>
@@ -612,6 +627,9 @@ public final class MurmurHash3 {
      * <p>This is a Murmur3-like 64-bit variant.
      * This method will be removed in a future release.</p>
      *
+     * <p>This implementation contains a sign-extension bug in the seed initialization.
+     * This manifests if the seed is negative.<p>
+     *
      * <p>This algorithm processes 8 bytes chunks of data in a manner similar to the 16 byte chunks
      * of data processed in the MurmurHash3 {@code MurmurHash3_x64_128} method. However the hash
      * is not mixed with a hash chunk from the next 8 bytes of data. The method will not return