Abstracting hash id logic.