Returns a hex string representing a hash value for the given data, which can either be Uint8Array or something that can be converted to a string.
This can be useful in situations where you want to capture an extremely concise characterization of some data to, for example, later detect whether it has changed. If two data have the same hash, it is statistically probably that they’re the same data.
$ ori Origami.hash/hello
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
$ ori Origami.hash/hello!
8f7d88e901a5ad3a05d8cc0de93313fd76028f8c
$ ori Origami.hash/hello
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
Here the middle input string is slightly different and so produces a (very different) hash string. The first and last inputs are the same, so they produce the same hash string.
To obtain hashes for all values in a tree, see Tree.manifest.