Exploit databaseDownload repository ZIP
GH-92e95914f738c6f50f413c64d5a2b0cd
kahla-sec/cve-2021-27850_poc
Sources for CVE-2021-27850
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files20
kahla-sec/cve-2021-27850_pocRevision 986f9fc1a3c1
- ↑..Parent directory
- class-use/
- Crypt.html
- DigestUtils.html
- HmacAlgorithms.html
- HmacUtils.html
- Md5Crypt.html
- MessageDigestAlgorithms.html
- MurmurHash2.html
- MurmurHash3.IncrementalHash32.html
- MurmurHash3.IncrementalHash32x86.html
- MurmurHash3.html
- PureJavaCrc32.html
- PureJavaCrc32C.html
- Sha2Crypt.html
- UnixCrypt.html
- XXHash32.html
- package-frame.html
- package-summary.html
- package-tree.html
- package-use.html
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.html
HTML · 64,589 bytes<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MurmurHash3 (Apache Commons Codec 1.15 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MurmurHash3 (Apache Commons Codec 1.15 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":41,"i2":41,"i3":9,"i4":9,"i5":41,"i6":41,"i7":41,"i8":41,"i9":9,"i10":9,"i11":9,"i12":9,"i13":41,"i14":9,"i15":9,"i16":41,"i17":41,"i18":41,"i19":41,"i20":41,"i21":41};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MurmurHash3.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.html" target="_top">Frames</a></li>
<li><a href="MurmurHash3.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li><a href="#field.summary">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.codec.digest</div>
<h2 title="Class MurmurHash3" class="title">Class MurmurHash3</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.codec.digest.MurmurHash3</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">MurmurHash3</span>
extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Implementation of the MurmurHash3 32-bit and 128-bit hash functions.
<p>
MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic
operations, multiply (MU) and rotate (R), used in its inner loop. Unlike cryptographic hash functions, it is not
specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes.
</p>
<p>
This contains a Java port of the 32-bit hash function <code>MurmurHash3_x86_32</code> and the 128-bit hash function
<code>MurmurHash3_x64_128</code> from Austin Applyby's original <code>c++</code> code in SMHasher.
</p>
<p>
This is public domain code with no copyrights. From home page of
<a href="https://github.com/aappleby/smhasher">SMHasher</a>:
</p>
<blockquote> "All MurmurHash versions are public domain software, and the author disclaims all copyright to their
code." </blockquote>
<p>
Original adaption from Apache Hive. That adaption contains a <code>hash64</code> method 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</code> methods using the input data converted to bytes.
<p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.13</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>,
<a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> Original MurmurHash3 c++
code</a>,
<a href=
"https://github.com/apache/hive/blob/master/storage-api/src/java/org/apache/hive/common/util/Murmur3.java">
Apache Hive Murmer3</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></span></code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use IncrementalHash32x86. This corrects the processing of trailing bytes.</span></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></span></code>
<div class="block">Generates 32-bit hash from input bytes.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#DEFAULT_SEED">DEFAULT_SEED</a></span></code>
<div class="block">A default seed to use for the murmur hash algorithm.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#NULL_HASHCODE">NULL_HASHCODE</a></span></code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">This is not used internally and will be removed in a future release.</span></div>
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-">hash128</a></span>(byte[] data)</code>
<div class="block">Generates 128-bit hash from the byte array with a default seed.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-">hash128</a></span>(byte[] data,
int offset,
int length,
int seed)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>. This corrects the seed initialization.</span></div>
</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-java.lang.String-">hash128</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> using the bytes returned from
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>.</span></div>
</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64</a></span>(byte[] data)</code>
<div class="block">Generates 128-bit hash from the byte array with a seed of zero.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-">hash128x64</a></span>(byte[] data,
int offset,
int length,
int seed)</code>
<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-">hash32</a></span>(byte[] data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-">hash32</a></span>(byte[] data,
int length)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-">hash32</a></span>(byte[] data,
int length,
int seed)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-">hash32</a></span>(byte[] data,
int offset,
int length,
int seed)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-">hash32</a></span>(long data)</code>
<div class="block">Generates 32-bit hash from a long with a default seed value.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-int-">hash32</a></span>(long data,
int seed)</code>
<div class="block">Generates 32-bit hash from a long with the given seed.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-long-">hash32</a></span>(long data1,
long data2)</code>
<div class="block">Generates 32-bit hash from two longs with a default seed value.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-long-int-">hash32</a></span>(long data1,
long data2,
int seed)</code>
<div class="block">Generates 32-bit hash from two longs with the given seed.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-java.lang.String-">hash32</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a> with the bytes returned from
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>. This corrects the processing of trailing bytes.</span></div>
</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-">hash32x86</a></span>(byte[] data)</code>
<div class="block">Generates 32-bit hash from the byte array with a seed of zero.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-">hash32x86</a></span>(byte[] data,
int offset,
int length,
int seed)</code>
<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-">hash64</a></span>(byte[] data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a>.</span></div>
</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-">hash64</a></span>(byte[] data,
int offset,
int length)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div>
</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-">hash64</a></span>(byte[] data,
int offset,
int length,
int seed)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div>
</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-int-">hash64</a></span>(int data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>int</code>.</span></div>
</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-long-">hash64</a></span>(long data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>long</code>.</span></div>
</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-short-">hash64</a></span>(short data)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>short</code>.</span></div>
</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="NULL_HASHCODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NULL_HASHCODE</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static final long NULL_HASHCODE</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This is not used internally and will be removed in a future release.</span></div>
<div class="block">A random number to use for a hash code.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MurmurHash3.NULL_HASHCODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_SEED">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_SEED</h4>
<pre>public static final int DEFAULT_SEED</pre>
<div class="block">A default seed to use for the murmur hash algorithm.
Has the value <code>104729</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MurmurHash3.DEFAULT_SEED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="hash32-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre>public static int hash32(long data1,
long data2)</pre>
<div class="block">Generates 32-bit hash from two longs with a default seed value.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)
.putLong(data1)
.putLong(data2)
.array(), offset, 16, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data1</code> - The first long to hash</dd>
<dd><code>data2</code> - The second long to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-long-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre>public static int hash32(long data1,
long data2,
int seed)</pre>
<div class="block">Generates 32-bit hash from two longs with the given seed.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)
.putLong(data1)
.putLong(data2)
.array(), offset, 16, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data1</code> - The first long to hash</dd>
<dd><code>data2</code> - The second long to hash</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre>public static int hash32(long data)</pre>
<div class="block">Generates 32-bit hash from a long with a default seed value.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)
.putLong(data)
.array(), offset, 8, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The long to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre>public static int hash32(long data,
int seed)</pre>
<div class="block">Generates 32-bit hash from a long with the given seed.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)
.putLong(data)
.array(), offset, 8, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The long to hash</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static int hash32(byte[] data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
<div class="block">Generates 32-bit hash from the byte array with a default seed.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
int hash = MurmurHash3.hash32(data, offset, data.length, seed);
</pre>
<p>This implementation contains a sign-extension bug in the finalization step of
any bytes left over from dividing the length by 4. This manifests if any of these
bytes are negative.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static int hash32(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a> with the bytes returned from
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>. This corrects the processing of trailing bytes.</span></div>
<div class="block">Generates 32-bit hash from a string with a default seed.
<p>
Before 1.14 the string was converted using default encoding.
Since 1.14 the string is converted to bytes using UTF-8 encoding.
</p>
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
byte[] bytes = data.getBytes(StandardCharsets.UTF_8);
int hash = MurmurHash3.hash32(bytes, offset, bytes.length, seed);
</pre>
<p>This implementation contains a sign-extension bug in the finalization step of
any bytes left over from dividing the length by 4. This manifests if any of these
bytes are negative.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static int hash32(byte[] data,
int length)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
<div class="block">Generates 32-bit hash from the byte array with the given length and a default seed.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
int hash = MurmurHash3.hash32(data, offset, length, seed);
</pre>
<p>This implementation contains a sign-extension bug in the finalization step of
any bytes left over from dividing the length by 4. This manifests if any of these
bytes are negative.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>length</code> - The length of array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static int hash32(byte[] data,
int length,
int seed)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
<div class="block">Generates 32-bit hash from the byte array with the given length and seed. This is a
helper method that will produce the same result as:
<pre>
int offset = 0;
int hash = MurmurHash3.hash32(data, offset, length, seed);
</pre>
<p>This implementation contains a sign-extension bug in the finalization step of
any bytes left over from dividing the length by 4. This manifests if any of these
bytes are negative.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>length</code> - The length of array</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static int hash32(byte[] data,
int offset,
int length,
int seed)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div>
<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed.
<p>This is an implementation of the 32-bit hash function <code>MurmurHash3_x86_32</code>
from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p>
<p>This implementation contains a sign-extension bug in the finalization step of
any bytes left over from dividing the length by 4. This manifests if any of these
bytes are negative.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>offset</code> - The offset of data</dd>
<dd><code>length</code> - The length of array</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
</dl>
</li>
</ul>
<a name="hash32x86-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32x86</h4>
<pre>public static int hash32x86(byte[] data)</pre>
<div class="block">Generates 32-bit hash from the byte array with a seed of zero.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 0;
int hash = MurmurHash3.hash32x86(data, offset, data.length, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.14</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash32x86-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash32x86</h4>
<pre>public static int hash32x86(byte[] data,
int offset,
int length,
int seed)</pre>
<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed.
<p>This is an implementation of the 32-bit hash function <code>MurmurHash3_x86_32</code>
from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>offset</code> - The offset of data</dd>
<dd><code>length</code> - The length of array</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 32-bit hash</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.14</dd>
</dl>
</li>
</ul>
<a name="hash64-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash64</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long hash64(long data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>long</code>.</span></div>
<div class="block">Generates 64-bit hash from a long with a default seed.
<p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p>
<p>This is a Murmur3-like 64-bit variant.
The method does not produce the same result as either half of the hash bytes from
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data from the <code>long</code>.
This method will be removed in a future release.</p>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> 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>
int offset = 0;
int seed = 104729;
long hash = MurmurHash3.hash64(ByteBuffer.allocate(8)
.putLong(data)
.array(), offset, 8, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The long to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 64-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash64-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash64</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long hash64(int data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>int</code>.</span></div>
<div class="block">Generates 64-bit hash from an int with a default seed.
<p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p>
<p>This is a Murmur3-like 64-bit variant.
The method does not produce the same result as either half of the hash bytes from
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data from the <code>int</code>.
This method will be removed in a future release.</p>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> 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>
int offset = 0;
int seed = 104729;
long hash = MurmurHash3.hash64(ByteBuffer.allocate(4)
.putInt(data)
.array(), offset, 4, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The int to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 64-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash64-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash64</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long hash64(short data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>short</code>.</span></div>
<div class="block">Generates 64-bit hash from a short with a default seed.
<p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p>
<p>This is a Murmur3-like 64-bit variant.
The method does not produce the same result as either half of the hash bytes from
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data from the <code>short</code>.
This method will be removed in a future release.</p>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> 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>
int offset = 0;
int seed = 104729;
long hash = MurmurHash3.hash64(ByteBuffer.allocate(2)
.putShort(data)
.array(), offset, 2, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The short to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 64-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash64-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash64</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long hash64(byte[] data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a>.</span></div>
<div class="block">Generates 64-bit hash from a byte array with a default seed.
<p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p>
<p>This is a Murmur3-like 64-bit variant.
The method does not produce the same result as either half of the hash bytes from
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data.
This method will be removed in a future release.</p>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> 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>
int offset = 0;
int seed = 104729;
long hash = MurmurHash3.hash64(data, offset, data.length, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 64-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash64-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash64</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long hash64(byte[] data,
int offset,
int length)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div>
<div class="block">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++</code> implementation.</strong></p>
<p>This is a Murmur3-like 64-bit variant.
The method does not produce the same result as either half of the hash bytes from
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data.
This method will be removed in a future release.</p>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> 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>
int seed = 104729;
long hash = MurmurHash3.hash64(data, offset, length, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>offset</code> - The offset of data</dd>
<dd><code>length</code> - The length of array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 64-bit hash</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash64-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash64</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long hash64(byte[] data,
int offset,
int length,
int seed)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation.
Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div>
<div class="block">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++</code> implementation.</strong></p>
<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</code> method. However the hash
is not mixed with a hash chunk from the next 8 bytes of data. The method will not return
the same value as the first or second 64-bits of the function
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a>.</p>
<p>Use of this method is not advised. Use the first long returned from
<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>offset</code> - The offset of data</dd>
<dd><code>length</code> - The length of array</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 64-bit hash</dd>
</dl>
</li>
</ul>
<a name="hash128-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash128</h4>
<pre>public static long[] hash128(byte[] data)</pre>
<div class="block">Generates 128-bit hash from the byte array with a default seed.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
int hash = MurmurHash3.hash128(data, offset, data.length, seed);
</pre>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a> does not effect
this result as the default seed is positive.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 128-bit hash (2 longs)</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash128x64-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash128x64</h4>
<pre>public static long[] hash128x64(byte[] data)</pre>
<div class="block">Generates 128-bit hash from the byte array with a seed of zero.
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 0;
int hash = MurmurHash3.hash128x64(data, offset, data.length, seed);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 128-bit hash (2 longs)</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.14</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash128-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash128</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long[] hash128(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> using the bytes returned from
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>.</span></div>
<div class="block">Generates 128-bit hash from a string with a default seed.
<p>
Before 1.14 the string was converted using default encoding.
Since 1.14 the string is converted to bytes using UTF-8 encoding.
</p>
This is a helper method that will produce the same result as:
<pre>
int offset = 0;
int seed = 104729;
byte[] bytes = data.getBytes(StandardCharsets.UTF_8);
int hash = MurmurHash3.hash128(bytes, offset, bytes.length, seed);
</pre>
<p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a> does not effect
this result as the default seed is positive.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input String</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 128-bit hash (2 longs)</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="hash128-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hash128</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static long[] hash128(byte[] data,
int offset,
int length,
int seed)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>. This corrects the seed initialization.</span></div>
<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed.
<p>This is an implementation of the 128-bit hash function <code>MurmurHash3_x64_128</code>
from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p>
<p>This implementation contains a sign-extension bug in the seed initialization.
This manifests if the seed is negative.<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>offset</code> - The first element of array</dd>
<dd><code>length</code> - The length of array</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 128-bit hash (2 longs)</dd>
</dl>
</li>
</ul>
<a name="hash128x64-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hash128x64</h4>
<pre>public static long[] hash128x64(byte[] data,
int offset,
int length,
int seed)</pre>
<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed.
<p>This is an implementation of the 128-bit hash function <code>MurmurHash3_x64_128</code>
from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The input byte array</dd>
<dd><code>offset</code> - The first element of array</dd>
<dd><code>length</code> - The length of array</dd>
<dd><code>seed</code> - The initial seed value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The 128-bit hash (2 longs)</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.14</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MurmurHash3.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.html" target="_top">Frames</a></li>
<li><a href="MurmurHash3.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li><a href="#field.summary">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>