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

Fix check digit canonicalisation issue #102

Closed RalphTro closed 1 year ago

RalphTro commented 1 year ago

Dear @dakbhavesh and @Echsecutor , I fixed the bug regarding SSCC canonicalisation and adjusted all examples + corresponding pre-hash strings + hashes. I also tested various examples, and the SSCC (and also other Keys such as GSRN or GSIN), is converted correctly now - both on my Mac as well as on my Windows machine. (In this regard: I wasn't able to reproduce the other issue, where GSRN et al. were not correctly converted.)

For instance, when executing the code of this branch for epclist_normalisation.jsonld, it returns the following (correct) canonicalised URIs:

epc=https://id.gs1.org/00/340123451111111111
epc=https://id.gs1.org/402/40123452223334442
epc=https://id.gs1.org/8017/401234500000000074
epc=https://id.gs1.org/8018/401234500000067657

Please have a look if this looks fine for you as well.

Many thanks in advance and kind regards, Ralph

dakbhavesh commented 1 year ago

Dear @RalphTro, The changes look good to me.