Hashtool in Java for the console