Hash validation

Oct 9, 2014 at 3:35 PM
Hi there,
Have you compared your results about hash validation with the obtained by authorities application.
I'm getting different results that seems that you are marking error when there isn't.
Reading your sourcecode, I suspect that you miss that the hash is by document series (1st part of the full document number) and not mixing all series.
Thanks
Ricardo

PS: very good work by the way! :-)
Coordinator
Oct 10, 2014 at 6:23 PM
Hello,

First thanks for using and reporting eventual bugs.

If i not mistaken, the code that check the hash for all documents, is considering that the documents are all in order by number and document series.
So unless the documents are unordered, it should work just fine.

But i could be missing something, if you could provide some sample of that error, it would be great.

Thanks
Frederico
Oct 10, 2014 at 7:15 PM
Hi again,

The Source Documents may not be by order so you must sort the documents by serie and then by number before checking the hash. There's no rule on the SAFT about ordering the documents so may have sequential by issue date so mixing series.

If I have:

FT A/11 =» gives error but maybe miss the 10
FT A/12 =» gives ok
FT B/1 =» gives error (but because it uses FT 1/12 otherwise it was OK)
FT A/13 =» gives error because validate against/with FTB/1 (another serie)


thanks
Ricardo
Coordinator
Oct 10, 2014 at 8:41 PM
Hello,

You are right, there is no obligation for the documents on the SAFT file to be grouped by series. And with this on mind, it could do incorrect errors.
I will do a fix ASAP.

Thanks
Frederico
Coordinator
Oct 10, 2014 at 10:37 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.