public synchronized boolean loadPublicKey(){
  if (!has("public_key") || !has("key_algorithm"))   return false;
  String encodedKey=getString("public_key");
  String algorithm=getString("key_algorithm");
  PublicKey pub=IO.decodePublicKey(encodedKey,algorithm);
  if (pub != null) {
    public_key=pub;
    key_algorithm=algorithm;
    setPeerHash();
    return true;
  }
  return false;
}

public synchronized boolean loadPublicKey ( ) { if ( ! has ( "public_key" ) || ! has ( "key_algorithm" ) ) return false ; String encodedKey = getString ( "public_key" ) ; String algorithm = getString ( "key_algorithm" ) ; PublicKey pub = IO . decodePublicKey ( encodedKey , algorithm ) ; if ( pub != null ) { public_key = pub ; key_algorithm = algorithm ; setPeerHash ( ) ; return true ; } return false ; }
load public key from file
