Comments (5)
With my implementation, when i hash "The quick brown fox jumps over the lazy
dog" (using seed 0x9747b28c), i get:
0x2FA826CD
You post what *you* get, and if they match then we'll say it's ready to ship.
Original comment by [email protected]
on 28 Apr 2012 at 12:20
from smhasher.
SMHasher uses the VerificationTest function to check if a hash function is
correctly implemented - it doesn't rely on correct capitalization or
punctuation of "The quick brown fox..." and catches more implementation errors
than a single test vector can. I'll make a note on the front page to point it
out.
Original comment by [email protected]
on 11 May 2012 at 5:44
- Changed state: WontFix
from smhasher.
While SMHasher certainly provides a more complete test suite, it's not very
helpful in testing the implementation in another language. I have recently
ported the hash to c# and generated a few test vectors for 3 different seeds
(0x9747b28c, 0x0, 0xc58f1a7b) including a small collision test against english
words.
x86_32: http://pastebin.com/kkggV9Vx
x64_128: http://pastebin.com/k2VDbWkF
Original comment by [email protected]
on 26 May 2012 at 8:43
from smhasher.
So what is the correct x64_128 hash for "The quick brown fox jumps over the
lazy dog" and zero seed?
Previous post = 6C1B07BC7BBC4BE347939AC4A93C437A
Python smhasher:
>>> hex(smhasher.murmur3_x64_128(u"The quick brown fox jumps over the lazy
dog",0))
'0x6c1b07bc7bbc4be347939ac4a93c437aL'
Java Guava:
>>> System.out.println(Hashing.murmur3_128(0).hashString("The quick brown fox
jumps over the lazy dog"));
4cae51b5316602c01c7c5642843e5fe7
Which version is correct?
Original comment by [email protected]
on 13 Sep 2012 at 11:20
from smhasher.
As I mentioned on the Guava bug
(http://code.google.com/p/guava-libraries/issues/detail?id=1147),
In Guava, if you just call Hasher#hashString(String), it'll hash each character
in order (no char encoding).
What you want is Hasher#hashString(String, Charset):
HashCode foxHash = Hashing.murmur3_128(0).hashString(
"The quick brown fox jumps over the lazy dog", Charsets.UTF_8);
assertEquals("6c1b07bc7bbc4be347939ac4a93c437a", foxHash.toString());
// This is the same as your Python output.
Original comment by kurt.kluever
on 13 Sep 2012 at 4:51
from smhasher.
Related Issues (20)
- Murmur3A on CentOS 6 x86_64 fails Window Tests HOT 1
- Minor changes to allow compiling MurmurHash3.cpp as C code. HOT 1
- SmHasher breaks without -fno-strict-aliasing
- could you add boost::hash to compare ? HOT 3
- MSVC2010 compilation. HOT 4
- City.cpp compilation warnings on Windows 64-bit target
- Probably bug in KeysetTest.cpp
- MurmurHash3_x64_128 reads past end of key buffer HOT 1
- [PATCH] Add missing `inline' keyword to FORCE_INLINE HOT 2
- Wrote a constexpr MurmurHash3 function
- SHA1 Sanity does not agree with Node.js SHA1. HOT 2
- MurmurHash3_x86_32 Algorithm Does Not match the one in Wikipedia HOT 3
- missing license
- Fixes to City.h to to allow inclusion in third-party sources HOT 1
- Make inline Functions static
- More hashes
- PMurHash.c on Solaris
- murmurhash3 128bit gives wrong result on big-endian platform HOT 1
- Improper handling of negative seeds HOT 1
- Core dump HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smhasher.