themadcreator / rabinfingerprint

A very collision-resistant fingerprint method.
Other
58 stars 27 forks source link

Handprint.buildAll() seems wrong #10

Open sandymac opened 8 years ago

sandymac commented 8 years ago

Handprint.buildAll() calls getPalm(), getAllFingers() and getHandFingers() apparently to fully compute each. But getPalm() fully consumes the InputSteam and then getAllFingers() fully consumes the InputSteam (which was now empty) and getHandFingers() calls getAllFingers() which makes the buildAll() call to getAllFingers() redundant.

If I'm right about the above this also means attempting to get the "palm" or the "fingers" in this class is mutually exclusive which I find counter intuitive based on the API.

I am trying to understand Rabin Fingerprinting via your project but it seems to me this code is just not right.

themadcreator commented 8 years ago

Thanks for taking the time to file this. I'll be looking into this over the next week or two

On Friday, December 18, 2015, Sandy McArthur notifications@github.com wrote:

Handprint.buildAll() https://github.com/themadcreator/rabinfingerprint/blob/master/src/main/java/org/rabinfingerprint/handprint/Handprint.java#L32 calls getPalm(), getAllFingers() and getHandFingers() apparently to fully compute each. But getPalm() fully consumes the InputSteam and then getAllFingers() fully consumes the InputSteam (which was now empty) and getHandFingers() calls getAllFingers() which makes the buildAll() call to getAllFingers() redundant.

If I'm right about the above this also means attempting to get the "palm" or the "fingers" in this class is mutually exclusive which I find counter intuitive based on the API.

I am trying to understand Rabin Fingerprinting via your project but it seems to me this code is just not right.

— Reply to this email directly or view it on GitHub https://github.com/themadcreator/rabinfingerprint/issues/10.