Hi there, I am new to stellar java api, i am trying to get public key of my account from KeyPair which is generated by using secret key
here is my code
public static boolean isValidStellarKeyPair (String private_key, String leadPublicKey) throws IOException, StellarCustomException{
try {
KeyPair keyPair = KeyPair.fromSecretSeed(private_key.getBytes());
if(keyPair.getPublicKey().toString().equals(leadPublicKey)) {
return true;
}
}catch (RuntimeException ex){
UnCaughtStellarExceptionHandler handler = new UnCaughtStellarExceptionHandler(ex);
return false;
}
return false;
}
so here am trying to compare the actulPublic and the PublicKey which i got from keyPair, few days back it's working fine but now suddenly rather that public key it (keyPair.getPublicKey().toString())is providing some object which i didn't understand can anybody help me out.
Thanks in advance.