Revert to previous hash method for HashID and optimize it.