Sha256: 612533ddc164476dad85462d2e45ba3fc2129e9df19f114d39abc06073e35620
Contents?: true
Size: 1.35 KB
Versions: 1
Compression:
Stored size: 1.35 KB
Contents
# Digest::MurmurHash [![Build Status](https://travis-ci.org/ksss/digest-murmurhash.png?branch=master)](https://travis-ci.org/ksss/digest-murmurhash) **MurmurHash** is a algorithm desiged by Austin Appleby. **Digest::MurmurHash1** use algorithm MurmurHash1(32-bit). **Digest::MurmurHash2** use algorithm MurmurHash2(32-bit). (**Digest::MurmurHash** exist to write only version number) All classes compliance Digest API of Ruby. ## Usage You can use same interface built-in Digest::XXX classes. ```ruby require 'digest/murmurhash' # MurmurHash1 can use like same than Digest::XXX. p Digest::MurmurHash1.hexdigest('murmurhash') #=> 'c709abd5' p Digest::MurmurHash1.file("./LICENSE.txt").hexdigest #=> '712e9641' # and MurmurHash2 too. but return another value because using another algorithm. p Digest::MurmurHash2.hexdigest('murmurhash') #=> '33f67c7e' p Digest::MurmurHash2.file("./LICENSE.txt").hexdigest #=> '78678326' ``` ## Class tree **Digest::MurmurHash1** < Digest::StringBuffer **Digest::MurmurHash2** < Digest::StringBuffer ## Installation Add this line to your application's Gemfile: gem 'digest-murmurhash' And then execute: $ bundle Or install it yourself as: $ gem install digest-murmurhash ## License See the file LICENSE.txt. ## See also [https://sites.google.com/site/murmurhash/](https://sites.google.com/site/murmurhash/)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
digest-murmurhash-0.2.1 | README.md |