Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/digest
spec
.gitignore
.gitlab-ci.yml
.rspec
.rubocop.yml
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
digest-ed2k-hash.gemspec

README.md

ED2K digest for Ruby

build status Build Status Gem Gem Inline docs Code Climate Test Coverage

This is a Ruby implementation of the ED2k hashing algorithm. Additional information can be found here.

Documentation

Installation

Add this line to your application's Gemfile:

gem 'digest-ed2k-hash'

And then execute:

$ bundle

Or install it yourself as:

$ gem install digest-ed2k-hash

Example usage

require 'digest/ed2k'

# Create a hexdigest of a file
puts Digest::ED2K.file('myfile').hexdigest

# Append strings to a digest object
dig = Digest::ED2K.new
dig << 'hello'
dig << ' world'
dig.finish
puts dig.hexdigest

Contributing

Bug reports and merge requests are welcome on GitLab.