RalphTro / epcis-event-hash-generator

ALGORITHM and SOFTWARE PROTOTYPE to uniquely identify/validate the integrity of any EPCIS event through a common, syntax-agnostic approach based on hashing. Takes an EPCIS Document (formatted in either XML or JSON-LD) and returns the corresponding hash value(s).
MIT License
8 stars 4 forks source link

Add support for CBV 2.1 (timestamp rounding) #115

Open RalphTro opened 1 month ago

RalphTro commented 1 month ago

Compared to version 2.0, CBV 2.1 comes with one substantial change in the algorithm specification: how to round up/down timestamp values. So far, all other change are editorial improvements.

The task consists in adjusting the software logic to enable the indication of the desired CBV version for calculation. If an EPCIS event comes with timestamps values with more than 4 digits, the CBV2.0 version returns the hash value without rounding them, while the CBV2.1 version takes this into consideration.

Once CBV 2.1 is ratified, the default version should be CBV2.1, which should also be reflected in the query string so that accessing application are aware which algorithm was used to construct the hash value.