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

persistentDisposition field #57

Closed clementh59 closed 2 years ago

clementh59 commented 3 years ago

Dear @RalphTro ,

The algorithm doesn't explain how to handle a persistentDisposition field (define here and implemented here for example).

Shall we consider it as a customField and add it at the end of the pre-hash string?

Regards,

Clément

RalphTro commented 3 years ago

Dear @clementh59 , 👍 you are a really good quality gate! You are correct. This is an oversight and needs to be added to the PROP_ORDER.

I see the following ToDos:

Will address this in the upcoming weeks.

Thanks a lot for pointing this out - very much appriated!

Kind regards, @RalphTro

clementh59 commented 3 years ago

Dear @RalphTro ,

Thanks 😂.

Great, thanks. Yes, after position 17 makes sense.

Best regards, Clément

RalphTro commented 3 years ago

Dear @Echsecutor , I almost managed to address all activities necessary to address this issue, i.e.:

But :-) the only thing I do not understand why the algorithm returns e.g. disposition=https://ns.gs1.org/voc/Disp-in_transitreadPointid=https://id.gs1.org/414/4012345000054persistentDispositionset=https://ns.gs1.org/voc/Disp-recalled

while according to the specified (new) property order (https://github.com/RalphTro/epcis-event-hash-generator/blob/persistentDisposition/epcis_event_hash_generator/__init__.py), it SHOULD be: disposition=https://ns.gs1.org/voc/Disp-in_transitpersistentDispositionset=https://ns.gs1.org/voc/Disp-recalledreadPointid=https://id.gs1.org/414/4012345000054 (i.e. readPoint should appear after disposition/persistentDisposition)

Would you mind (as soon as your bandwidth allows for it!) to have a look into this so that the algorithm returns the correct pre hash string? Many thanks in advance; Ralph

Echsecutor commented 3 years ago

Sorry for not really monitoring my github messages! If you open a PR I am happy to review and fix the last bits

Echsecutor commented 2 years ago

fixed in https://github.com/RalphTro/epcis-event-hash-generator/pull/58 by @RalphTro . Many thanks!