Hacker News new | ask | show | jobs
by jpdaigle 1218 days ago
Any hash calculations using a "read from stdin or a pipe" strategy, in my experience, is fraught with issues caused by an extra newline at the end of the input possibly being there today, and not in later checks, or vice-versa.

When people claim they wrote a prediction at some later date, they always have to document the EXACT command used to avoid this, e.g. `echo "smart prediction" | md5sum`

1 comments

Sure. The case in question is verifying a hash someone else gave you, so the problem you mention is present regardless of what verification method you're using.