Expand description
TypeIdentifier hash computation (XTypes 1.3 §7.3.1.2).
The EquivalenceHash (14 bytes) is formed from the first 14 bytes of the
MD5 digest over the XCDR2-serialized TypeObject representation
(XTypes 1.3 §7.3.1.2.1):
EquivalenceHash(T) := MD5(xcdr2_le_bytes(T))[0..14]Cyclone DDS and Fast-DDS use MD5 — hence mandatory for live interop.
- For
MinimalTypeObject T:EK_MINIMALhash - For
CompleteTypeObject T:EK_COMPLETEhash
From the hash a TypeIdentifier of kind EK_MINIMAL resp.
EK_COMPLETE is built — this is the “strongly-hashed” form of the
TypeObject, as exchanged between peers via SEDP (PID_TYPE_INFORMATION) and
the TypeLookup service.
Functions§
- complete_
hash_ input - The exact byte stream fed to MD5 for a
CompleteTypeObjecthash. - compute_
complete_ hash - Like
compute_minimal_hash, only forCompleteTypeObject. - compute_
hash - Computes the 14-byte EquivalenceHash of a TypeObject.
- compute_
minimal_ hash - Like
compute_hash, but directly overMinimalTypeObject(without the EquivalenceKind discriminator wrapper clone). Writes the EK_MINIMAL discriminator before the body itself. - hash_
bytes - Raw hash function: MD5 + truncate to 14 bytes.
- minimal_
hash_ input - The exact byte stream fed to MD5 for a
MinimalTypeObjecthash (XCDR2 DHEADER + EK + body). Exposed so conformance harnesses can byte-diff it against vendor TypeObject goldens. - to_
hashed_ type_ identifier - Shortcut: builds a strongly-hashed TypeIdentifier from a
TypeObject. Wraps
compute_hashin the matchingEquivalenceHash*TypeIdentifier variant depending on Minimal/Complete.