fixing bug when reading from /dev/random

it has filesize 0, which we were interpreting incorrectly
trapping String::hashCode, because we can