Updated PublicKeyhandler and Generatekeys to use sha checksum instead of
hashcode to check the integrity of the public key file.