Implement different types of hashing methods using java