You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/12/03 11:38:20 UTC
[commons-codec] branch master updated (9a84b3a -> 3ab9ce4)
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git.
from 9a84b3a [CODEC-265] Reinstate Base64 HugeLineSeparator test.
new df4a27c [CODEC-268] Deprecate MurmurHash4.hash64
new 6d544a5 Remove trailing whitespace
new 9125e28 [CODEC-268] Deprecate the NULL_HASHCODE.
new 7ade136 [CODEC-268] Deprecate hash methods using String.getBytes()
new fc9a12f Update hash32 primitive helper methods to refer to hash32x86.
new 0002aaf [CODEC-268] Track changes.
new 3ab9ce4 Remove extra blank line.
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/changes/changes.xml | 1 +
.../apache/commons/codec/digest/MurmurHash3.java | 122 +++++++++++++--------
.../apache/commons/codec/binary/Base64Test.java | 2 +-
.../commons/codec/digest/MurmurHash3Test.java | 10 +-
4 files changed, 83 insertions(+), 52 deletions(-)
[commons-codec] 03/07: [CODEC-268] Deprecate the NULL_HASHCODE.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 9125e28ceaca3d3adc2a4e9ab5775334af1f25bb
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:15:06 2019 +0000
[CODEC-268] Deprecate the NULL_HASHCODE.
---
src/main/java/org/apache/commons/codec/digest/MurmurHash3.java | 3 +++
1 file changed, 3 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 a1a03d7..d4876d3 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -53,7 +53,10 @@ package org.apache.commons.codec.digest;
public final class MurmurHash3 {
/**
* A random number to use for a hash code.
+ *
+ * @deprecated This is not used internally and will be removed in a future release.
*/
+ @Deprecated
public static final long NULL_HASHCODE = 2862933555777941757L;
/**
[commons-codec] 02/07: Remove trailing whitespace
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 6d544a50c9d7d3717bd9f3261db830db76ba2b64
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:13:06 2019 +0000
Remove trailing whitespace
---
src/test/java/org/apache/commons/codec/binary/Base64Test.java | 2 +-
src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/binary/Base64Test.java b/src/test/java/org/apache/commons/codec/binary/Base64Test.java
index 583876f..3a4af93 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base64Test.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base64Test.java
@@ -1402,7 +1402,7 @@ public class Base64Test {
// 1GiB: Input buffer to encode
// 1GiB: Existing working buffer (due to doubling of default buffer size of 8192)
// ~2GiB: New working buffer to allocate (due to doubling)
- // ~1.33GiB: Expected output size (since the working buffer is copied at the end)
+ // ~1.33GiB: Expected output size (since the working buffer is copied at the end)
// 32KiB: Some head room
final long estimatedMemory = (long) size1GiB * 4 + expectedLength + 32 * 1024;
Assume.assumeTrue("Not enough free memory for the test", presumableFreeMemory > estimatedMemory);
diff --git a/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java b/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
index 82a42fa..1a902ef 100644
--- a/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
+++ b/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
@@ -716,7 +716,7 @@ public class MurmurHash3Test {
/**
* Test the {@link MurmurHash3#hash128x64(byte[], int, int, int)} algorithm.
- *
+ *
* <p>Explicit test for a negative seed. The original implementation has a sign extension error
* for negative seeds.
*
[commons-codec] 06/07: [CODEC-268] Track changes.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 0002aaffbe7c14f42c9da00c243f44f2504b0145
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:37:26 2019 +0000
[CODEC-268] Track changes.
---
src/changes/changes.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b5afb7f..8cb83fd 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -43,6 +43,7 @@ The <action> type attribute can be add,update,fix,remove.
<body>
<release version="1.14" date="TBD" description="Feature and fix release.">
+ <action issue="CODEC-268" dev="aherbert" type="update">MurmurHash3: Deprecate hash64 methods and hash methods accepting a String that use the default encoding.</action>
<action issue="CODEC-265" dev="aherbert" type="fix">BaseNCodec to expand buffer using overflow conscious code.</action>
<action issue="CODEC-270" dev="aherbert" type="fix">Base32/64: Fixed decoding check that all the final trailing bits to discard are zero.</action>
<action issue="CODEC-264" dev="aherbert" due-to="Claude Warren" type="add">Add MurmurHash3.hash128x64 methods to fix sign extension error during seeding in hash128 methods.</action>
[commons-codec] 05/07: Update hash32 primitive helper methods to
refer to hash32x86.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit fc9a12fcca1e80adfe12280a944adcb864ae1f78
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:34:07 2019 +0000
Update hash32 primitive helper methods to refer to hash32x86.
Since the sign extension bug in hash32 is not relevant the javadoc can
point to the hash32x86 implementation which does not have the bug.
The result is the same. The unit tests have been updated to show this.
---
.../apache/commons/codec/digest/MurmurHash3.java | 48 ++++++++--------------
.../commons/codec/digest/MurmurHash3Test.java | 8 ++--
2 files changed, 22 insertions(+), 34 deletions(-)
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 f4b9cca..11d2aa4 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -104,19 +104,16 @@ public final class MurmurHash3 {
* <pre>
* int offset = 0;
* int seed = 104729;
- * int hash = MurmurHash3.hash32(ByteBuffer.allocate(16)
- * .putLong(data1)
- * .putLong(data2)
- * .array(), offset, 16, seed);
+ * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)
+ * .putLong(data1)
+ * .putLong(data2)
+ * .array(), offset, 16, seed);
* </pre>
*
- * <p>Note: The sign extension bug in {@link #hash32(byte[], int, int, int)} does not affect
- * this result as there are no bytes left over from dividing the length by 4.<p>
- *
* @param data1 The first long to hash
* @param data2 The second long to hash
* @return The 32-bit hash
- * @see #hash32(byte[], int, int, int)
+ * @see #hash32x86(byte[], int, int, int)
*/
public static int hash32(final long data1, final long data2) {
return hash32(data1, data2, DEFAULT_SEED);
@@ -128,20 +125,17 @@ public final class MurmurHash3 {
*
* <pre>
* int offset = 0;
- * int hash = MurmurHash3.hash32(ByteBuffer.allocate(16)
- * .putLong(data1)
- * .putLong(data2)
- * .array(), offset, 16, seed);
+ * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)
+ * .putLong(data1)
+ * .putLong(data2)
+ * .array(), offset, 16, seed);
* </pre>
*
- * <p>Note: The sign extension bug in {@link #hash32(byte[], int, int, int)} does not affect
- * this result as there are no bytes left over from dividing the length by 4.<p>
- *
* @param data1 The first long to hash
* @param data2 The second long to hash
* @param seed The initial seed value
* @return The 32-bit hash
- * @see #hash32(byte[], int, int, int)
+ * @see #hash32x86(byte[], int, int, int)
*/
public static int hash32(final long data1, final long data2, final int seed) {
int hash = seed;
@@ -164,17 +158,14 @@ public final class MurmurHash3 {
* <pre>
* int offset = 0;
* int seed = 104729;
- * int hash = MurmurHash3.hash32(ByteBuffer.allocate(8)
- * .putLong(data)
- * .array(), offset, 8, seed);
+ * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)
+ * .putLong(data)
+ * .array(), offset, 8, seed);
* </pre>
*
- * <p>Note: The sign extension bug in {@link #hash32(byte[], int, int, int)} does not affect
- * this result as there are no bytes left over from dividing the length by 4.<p>
- *
* @param data The long to hash
* @return The 32-bit hash
- * @see #hash32(byte[], int, int, int)
+ * @see #hash32x86(byte[], int, int, int)
*/
public static int hash32(final long data) {
return hash32(data, DEFAULT_SEED);
@@ -186,18 +177,15 @@ public final class MurmurHash3 {
*
* <pre>
* int offset = 0;
- * int hash = MurmurHash3.hash32(ByteBuffer.allocate(8)
- * .putLong(data)
- * .array(), offset, 8, seed);
+ * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)
+ * .putLong(data)
+ * .array(), offset, 8, seed);
* </pre>
*
- * <p>Note: The sign extension bug in {@link #hash32(byte[], int, int, int)} does not affect
- * this result as there are no bytes left over from dividing the length by 4.<p>
- *
* @param data The long to hash
* @param seed The initial seed value
* @return The 32-bit hash
- * @see #hash32(byte[], int, int, int)
+ * @see #hash32x86(byte[], int, int, int)
*/
public static int hash32(final long data, final int seed) {
int hash = seed;
diff --git a/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java b/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
index 1a902ef..4ba16cf 100644
--- a/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
+++ b/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
@@ -105,7 +105,7 @@ public class MurmurHash3Test {
for (final long j : data) {
buffer.putLong(0, i);
buffer.putLong(MurmurHash3.LONG_BYTES, j);
- Assert.assertEquals(MurmurHash3.hash32(bytes, offset, length, seed), MurmurHash3.hash32(i, j));
+ Assert.assertEquals(MurmurHash3.hash32x86(bytes, offset, length, seed), MurmurHash3.hash32(i, j));
}
}
}
@@ -127,7 +127,7 @@ public class MurmurHash3Test {
for (final long j : data) {
buffer.putLong(0, i);
buffer.putLong(MurmurHash3.LONG_BYTES, j);
- Assert.assertEquals(MurmurHash3.hash32(bytes, offset, length, seed), MurmurHash3.hash32(i, j, seed));
+ Assert.assertEquals(MurmurHash3.hash32x86(bytes, offset, length, seed), MurmurHash3.hash32(i, j, seed));
}
}
}
@@ -147,7 +147,7 @@ public class MurmurHash3Test {
final long[] data = createLongTestData();
for (final long i : data) {
buffer.putLong(0, i);
- Assert.assertEquals(MurmurHash3.hash32(bytes, offset, length, seed), MurmurHash3.hash32(i));
+ Assert.assertEquals(MurmurHash3.hash32x86(bytes, offset, length, seed), MurmurHash3.hash32(i));
}
}
@@ -166,7 +166,7 @@ public class MurmurHash3Test {
final long[] data = createLongTestData();
for (final long i : data) {
buffer.putLong(0, i);
- Assert.assertEquals(MurmurHash3.hash32(bytes, offset, length, seed), MurmurHash3.hash32(i, seed));
+ Assert.assertEquals(MurmurHash3.hash32x86(bytes, offset, length, seed), MurmurHash3.hash32(i, seed));
}
}
[commons-codec] 07/07: Remove extra blank line.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 3ab9ce4b76848afd2da7dca3e37c46259dd70866
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:37:42 2019 +0000
Remove extra blank line.
---
src/main/java/org/apache/commons/codec/digest/MurmurHash3.java | 1 -
1 file changed, 1 deletion(-)
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 11d2aa4..1507b00 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -62,7 +62,6 @@ public final class MurmurHash3 {
/**
* A default seed to use for the murmur hash algorithm.
* Has the value {@code 104729}.
- *
*/
public static final int DEFAULT_SEED = 104729;
[commons-codec] 01/07: [CODEC-268] Deprecate MurmurHash4.hash64
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit df4a27c9b87d7d2afec56492f96c7e549a32fbf5
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:12:52 2019 +0000
[CODEC-268] Deprecate MurmurHash4.hash64
This is not part of the MurmurHash3 implementation. It was ported from
Apache Hive. The hash collision properties are unknown for this method.
Updated the javadoc to make it clear that the method does not return a
hash that matches either part of the 128-bit hash function.
---
.../apache/commons/codec/digest/MurmurHash3.java | 64 +++++++++++++++++-----
1 file changed, 50 insertions(+), 14 deletions(-)
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 bbedbf0..a1a03d7 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -39,7 +39,9 @@ package org.apache.commons.codec.digest;
* </blockquote>
*
* <p>Original adaption from Apache Hive. That adaption contains a {@code hash64} method
- * that is not part of the original MurmurHash3 code.<p>
+ * that is not part of the original MurmurHash3 code. It is not recommended to use these methods.
+ * They will be removed in a future release. To obtain a 64-bit hash use half of the bits
+ * from the {@code hash128x64} methods using the input data converted to bytes.<p>
*
* @see <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>
* @see <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp">
@@ -428,9 +430,12 @@ public final class MurmurHash3 {
/**
* Generates 64-bit hash from a long with a default seed.
*
+ * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p>
+ *
* <p>This is a Murmur3-like 64-bit variant.
- * <strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong>
- * It may be removed in a future release.</p>
+ * The method does not produce the same result as either half of the hash bytes from
+ * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code long}.
+ * This method will be removed in a future release.</p>
*
* <p>This is a helper method that will produce the same result as:</p>
*
@@ -445,7 +450,10 @@ public final class MurmurHash3 {
* @param data The long to hash
* @return The 64-bit hash
* @see #hash64(byte[], int, int, int)
+ * @deprecated Not part of the MurmurHash3 implementation.
+ * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code long}.
*/
+ @Deprecated
public static long hash64(final long data) {
long hash = DEFAULT_SEED;
long k = Long.reverseBytes(data);
@@ -465,9 +473,12 @@ public final class MurmurHash3 {
/**
* Generates 64-bit hash from an int with a default seed.
*
+ * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p>
+ *
* <p>This is a Murmur3-like 64-bit variant.
- * <strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong>
- * It may be removed in a future release.</p>
+ * The method does not produce the same result as either half of the hash bytes from
+ * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code int}.
+ * This method will be removed in a future release.</p>
*
* <p>This is a helper method that will produce the same result as:</p>
*
@@ -482,7 +493,10 @@ public final class MurmurHash3 {
* @param data The int to hash
* @return The 64-bit hash
* @see #hash64(byte[], int, int, int)
+ * @deprecated Not part of the MurmurHash3 implementation.
+ * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code int}.
*/
+ @Deprecated
public static long hash64(final int data) {
long k1 = Integer.reverseBytes(data) & (-1L >>> 32);
final int length = INTEGER_BYTES;
@@ -500,9 +514,12 @@ public final class MurmurHash3 {
/**
* Generates 64-bit hash from a short with a default seed.
*
+ * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p>
+ *
* <p>This is a Murmur3-like 64-bit variant.
- * <strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong>
- * It may be removed in a future release.</p>
+ * The method does not produce the same result as either half of the hash bytes from
+ * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code short}.
+ * This method will be removed in a future release.</p>
*
* <p>This is a helper method that will produce the same result as:</p>
*
@@ -517,7 +534,10 @@ public final class MurmurHash3 {
* @param data The short to hash
* @return The 64-bit hash
* @see #hash64(byte[], int, int, int)
+ * @deprecated Not part of the MurmurHash3 implementation.
+ * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code short}.
*/
+ @Deprecated
public static long hash64(final short data) {
long hash = DEFAULT_SEED;
long k1 = 0;
@@ -537,9 +557,12 @@ public final class MurmurHash3 {
/**
* Generates 64-bit hash from a byte array with a default seed.
*
+ * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p>
+ *
* <p>This is a Murmur3-like 64-bit variant.
- * <strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong>
- * It may be removed in a future release.</p>
+ * The method does not produce the same result as either half of the hash bytes from
+ * {@linkplain #hash128x64(byte[])} with the same byte data.
+ * This method will be removed in a future release.</p>
*
* <p>This is a helper method that will produce the same result as:</p>
*
@@ -552,7 +575,10 @@ public final class MurmurHash3 {
* @param data The input byte array
* @return The 64-bit hash
* @see #hash64(byte[], int, int, int)
+ * @deprecated Not part of the MurmurHash3 implementation.
+ * Use half of the hash bytes from {@link #hash128x64(byte[])}.
*/
+ @Deprecated
public static long hash64(final byte[] data) {
return hash64(data, 0, data.length, DEFAULT_SEED);
}
@@ -560,9 +586,12 @@ public final class MurmurHash3 {
/**
* Generates 64-bit hash from a byte array with the given offset and length and a default seed.
*
+ * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p>
+ *
* <p>This is a Murmur3-like 64-bit variant.
- * <strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong>
- * It may be removed in a future release.</p>
+ * The method does not produce the same result as either half of the hash bytes from
+ * {@linkplain #hash128x64(byte[])} with the same byte data.
+ * This method will be removed in a future release.</p>
*
* <p>This is a helper method that will produce the same result as:</p>
*
@@ -576,7 +605,10 @@ public final class MurmurHash3 {
* @param length The length of array
* @return The 64-bit hash
* @see #hash64(byte[], int, int, int)
+ * @deprecated Not part of the MurmurHash3 implementation.
+ * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.
*/
+ @Deprecated
public static long hash64(final byte[] data, final int offset, final int length) {
return hash64(data, offset, length, DEFAULT_SEED);
}
@@ -584,9 +616,10 @@ public final class MurmurHash3 {
/**
* Generates 64-bit hash from a byte array with the given offset, length and seed.
*
+ * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p>
+ *
* <p>This is a Murmur3-like 64-bit variant.
- * <strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong>
- * It may be removed in a future release.</p>
+ * This method will be removed in a future release.</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
@@ -602,7 +635,10 @@ public final class MurmurHash3 {
* @param length The length of array
* @param seed The initial seed value
* @return The 64-bit hash
+ * @deprecated Not part of the MurmurHash3 implementation.
+ * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.
*/
+ @Deprecated
public static long hash64(final byte[] data, final int offset, final int length, final int seed) {
// ************
// Note: This fails to apply masking using 0xffffffffL to the seed.
@@ -961,7 +997,7 @@ public final class MurmurHash3 {
/** The total number of input bytes added since the start. */
private int totalLen;
/**
- * The current running hash.
+ * The current running hash.
* This must be finalised to generate the 32-bit hash value.
*/
private int hash;
[commons-codec] 04/07: [CODEC-268] Deprecate hash methods using
String.getBytes()
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 7ade1367c6856043b2bea455c3dbe96fb78e2813
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Dec 3 11:24:59 2019 +0000
[CODEC-268] Deprecate hash methods using String.getBytes()
A character encoding should be used to get the string bytes.
---
src/main/java/org/apache/commons/codec/digest/MurmurHash3.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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 d4876d3..f4b9cca 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -253,7 +253,8 @@ public final class MurmurHash3 {
* @param data The input string
* @return The 32-bit hash
* @see #hash32(byte[], int, int, int)
- * @deprecated Use {@link #hash32x86(byte[], int, int, int)} with the String byte data. This corrects the processing of trailing bytes.
+ * @deprecated Use {@link #hash32x86(byte[], int, int, int)} with the bytes returned from
+ * {@link String#getBytes(java.nio.charset.Charset)}. This corrects the processing of trailing bytes.
*/
@Deprecated
public static int hash32(final String data) {
@@ -751,7 +752,10 @@ public final class MurmurHash3 {
* @param data The input String
* @return The 128-bit hash (2 longs)
* @see #hash128(byte[], int, int, int)
+ * @deprecated Use {@link #hash128x64(byte[])} using the bytes returned from
+ * {@link String#getBytes(java.nio.charset.Charset)}.
*/
+ @Deprecated
public static long[] hash128(final String data) {
final byte[] bytes = data.getBytes();
return hash128(bytes, 0, bytes.length, DEFAULT_SEED);