Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
doomrobo
· 11y ago · 0 comments
Loading everything into memory at once shouldn't be necessary to produce a hash of the entire input. All of the hash functions currently supported allow for incremental hashing. That means you can hash in blocks instead of all at once.
Comments
[–]
unsoundInput
11y ago
The input still needs to be cached for eventual output in case the hash matches I assume.
[–]
stouset
11y ago
More importantly, so nothing is output if the hash
doesn't
match.
[–]
doomrobo
OP
11y ago
In that case, you could still cache if you want but at least you now have the option to manage your memory instead of always crashing with large input