{"id":22038597,"url":"https://github.com/jamescook/highwayhash","last_synced_at":"2025-05-07T21:25:41.737Z","repository":{"id":56876410,"uuid":"185033837","full_name":"jamescook/highwayhash","owner":"jamescook","description":"Bindings for google/highwayhash","archived":false,"fork":false,"pushed_at":"2020-02-29T16:44:50.000Z","size":9,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-22T04:51:35.024Z","etag":null,"topics":["ffi","highwayhash","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamescook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-05T13:18:08.000Z","updated_at":"2021-02-26T15:44:40.000Z","dependencies_parsed_at":"2022-08-20T11:30:55.442Z","dependency_job_id":null,"html_url":"https://github.com/jamescook/highwayhash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Fhighwayhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Fhighwayhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Fhighwayhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Fhighwayhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamescook","download_url":"https://codeload.github.com/jamescook/highwayhash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252956031,"owners_count":21831229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffi","highwayhash","ruby"],"created_at":"2024-11-30T11:06:50.355Z","updated_at":"2025-05-07T21:25:41.695Z","avatar_url":"https://github.com/jamescook.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highwayhash Ruby Bindings\n\nBinding for the HighwayHash64 function defined in [google/highwayhash](https://github.com/google/highwayhash)\n\n[![Build Status](https://travis-ci.com/jamescook/highwayhash.svg?branch=master)](https://travis-ci.com/jamescook/highwayhash)\n\n### Requirements\n- highwayhash must be compiled and installed where FFI can find it\n  (e.g in /usr/local/lib)\n\n### Usage\n```ruby\nkey = SecureRandom.random_bytes(32) # This should be secret\n\n# Hash of a simple string\nputs Highwayhash.hash64(\"any string\", key)\n\n# Hash of an IO-like object (must respond to 'read')\nputs Highwayhash.hash64(File.new(\"/path/to/bee_movie_script.txt\", key)\n```\n\n### Comparison with other hashing algorithms\nResults from running benchmark/bench.rb on Ruby 2.6.3:\n\n```\nCalculating -------------------------------------\nHighwayhash (3550000 bytes)\n                          1.128k (± 5.9%) i/s -     16.983k in  15.107726s\nDigest::MD5 (3550000 bytes)\n                        185.121  (± 3.8%) i/s -      2.790k in  15.095315s\nDigest::SHA1 (3550000 bytes)\n                        259.470  (± 3.5%) i/s -      3.900k in  15.049261s\nDigest::SHA2 (3550000 bytes)\n                        119.173  (± 3.4%) i/s -      1.788k in  15.020991s\n\nComparison:\nHighwayhash (3550000 bytes):     1128.2 i/s\nDigest::SHA1 (3550000 bytes):      259.5 i/s - 4.35x  slower\nDigest::MD5 (3550000 bytes):      185.1 i/s - 6.09x  slower\nDigest::SHA2 (3550000 bytes):      119.2 i/s - 9.47x  slower\n\nCalculating -------------------------------------\nHighwayhash (16 bytes)\n                        351.403k (± 5.3%) i/s -      5.278M in  15.063735s\nDigest::MD5 (16 bytes)\n                        793.475k (± 3.5%) i/s -     11.889M in  15.003608s\nDigest::SHA1 (16 bytes)\n                        760.100k (± 7.2%) i/s -     11.357M in  15.025721s\nDigest::SHA2 (16 bytes)\n                        443.165k (± 5.6%) i/s -      6.647M in  15.052250s\n\nComparison:\nDigest::MD5 (16 bytes):   793474.8 i/s\nDigest::SHA1 (16 bytes):   760099.8 i/s - same-ish: difference falls within error\nDigest::SHA2 (16 bytes):   443165.2 i/s - 1.79x  slower\nHighwayhash (16 bytes):   351402.6 i/s - 2.26x  slower\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamescook%2Fhighwayhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamescook%2Fhighwayhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamescook%2Fhighwayhash/lists"}