Skip to content
This repository was archived by the owner on Mar 15, 2021. It is now read-only.
openregisterPublic archive

About

A way to cryptographically hash structured data with the possibility of redaction

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

objecthash-java

objecthash-java is a Java version of Ben Laurie's objecthash.

This will be used by openregister-java to provide a verifiable log of data. For more details see the following RFCs:

Differences from the original objecthash algorithm

Types

The set of types supported this objecthash implementation are:

  • Integer
  • Unicode string
  • List
  • Set
  • Hash
  • Timestamp

Timestamp is an extension. It represents a datetime in UTC with seconds precision, and is encoded by taking the ISO8601 string representation and prefixing with the tag "t".

objecthash-java does not implement Boolean or Float types.

Redacting primitive values

TODO

Examples

Hash a single value:

ObjectHash.stringToHexDigest("Hello world"); // bd75f78d2f7aa16b72d9fcdb822754a10310ef4cd5b6cca6aa48d98331e246ab

Dependencies

  • Java 11

Licence

MIT License

About

A way to cryptographically hash structured data with the possibility of redaction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages