This crate specifies the CdrEncodingSize trait. It is a helper to the RustDDS library.

The trait is in a separate crate, because it has a derive-macro.

The RTPS specification version 2.5 Section "9.6.4.8 KeyHash (PIDKEYHASH)" defines an algorithm for computing a 16-byte hash of a DDS Key of a data sample.

The algorithm summary:

This trait is a means of deciding if the 16-byte limit is exceede, i.e. if MD5 shold be used or not.