Overview

In MUFL, cryptographic hash values use domain HASH_CODE.

_print (_typeof (_value_id 1)). // prints: "HASH_CODE"

All data and code in ADAPT is hash-addressed. All hashing is “deep”, that is, the hash accounts for all values in a data structure.

The exception to this rule is references whose hashes do not account for the data that they refer to.

The hash code of a data item is retrieved using the _value_id primitive function. The hash code of the currently-running application is determined with _get_code_id function.

The information about the hash is retrieved using _get_hash_code_metadata function:

_get_hash_code_metadata (_value_id 1). // returns ("hash_shape_version"->("maj"->1,"min"->0,),"hash_type"->"BL2B",)

As you can see, hash metadata consists of the type of hash and of the version of its “shape”. Shape refers to the process used to hash complex values and may change when ADAPT is upgraded.

It is possible switch the type of hash used by ADAPT. Currently, the framework supports BLAKE2b and SHA-256 cryptographic hashes. Contact the ADAPT Team for details of how to do this, if necessary.