Method getHash, removed not used "if".