Hacker GitHub

← All repos

benlaurie/objecthash

View on GitHub ↗ ★ 147 Ruby

A way to cryptographically hash objects (in the JSON-ish sense) that works cross-language. And, therefore, cross-encoding.

6 mentions on Hacker News by 4 people: 1 story, 5 comments · first 2016-11-02 · latest 2019-07-24

Mentions per year 6 mentions · busiest year 2016 (3)
20082026
  1. …project I didn't get a chance to work into this post (because it's entirely deserving of its own): https://github.com/benlaurie/objecthash To be clear: I think that's a niche use case and while I think ObjectHash does a great job of…
    comment by lvh · 2019-07-24 · in How not to sign a JSON object
  2. …prepends the input data with 32 bytes of random data before hashing in order to prevent this. [0] https://github.com/benlaurie/objecthash#redactability
  3. …to be able to consistently hash JSON objects you might want to look at Ben Laurie's objecthash: https://github.com/benlaurie/objecthash It describes a consistent way to hash an object without defining a new format.
  4. …documents may refer to the same underlying data structure, but all will have the same "objecthash": https://github.com/benlaurie/objecthash
  5. …for TJSON (cryptographically authenticated data), and normalizing them is rather difficult: https://github.com/benlaurie/objecthash/blob/master/objectha...