garydgregory commented on a change in pull request #22: CODEC-236: MurmurHash2 
and MurmurHash3 implementations.
URL: https://github.com/apache/commons-codec/pull/22#discussion_r302111091
 
 

 ##########
 File path: src/main/java/org/apache/commons/codec/digest/MurmurHash2.java
 ##########
 @@ -0,0 +1,215 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.codec.digest;
+
+/**
+ * MurmurHash2 yields a 32-bit or 64-bit value.
+ * 
+ * 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.
+ * 
+ * This is a re-implementation of the original C code plus some additional
+ * features.
+ * 
+ * Public domain.
+ * 
+ * @author Viliam Holub
+ * @see <a href="https://en.wikipedia.org/wiki/MurmurHash";>MurmurHash</a>
+ * @since 1.13
+ */
+public final class MurmurHash2 {
+
+       // all methods static; private constructor.
 
 Review comment:
   NOT all methods should be static: You should implement Codec's 
`BinaryEncoder` and `BinaryDecoder` interfaces and/or `StringEncoder` and 
`StringDecoder` depending on the use cases of this code.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to