Hash: refactor unit tests

See https://github.com/phpseclib/phpseclib/pull/446#discussion_r16031599