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:
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.
TODO
Hash a single value:
ObjectHash.stringToHexDigest("Hello world"); // bd75f78d2f7aa16b72d9fcdb822754a10310ef4cd5b6cca6aa48d98331e246ab
- Java 11