@Test public void verifySignatureTest() { PublicKey publicKey = new PublicKey(Utils.HEX.decode("02cf6cecbac4b6b541ba06c7b58477297a06b2295cf9e2a95566241c287096b895")); MasternodeSignature vchSig = new MasternodeSignature(Utils.HEX.decode("1f4af594078c451b20fbe0ebae22a919b8694b8c4683f0cb36dd835e8a1f6114277d0568f4dcac1d479c169d56a921687f9ae8b315e687ef1920a347dcaa32dc1a")); String message = "139.59.254.15:999915239445811bd94fd9f0b98eb669fa2c1dc1bda3da99f4c69ed40ce1ccc666e3be757d966d927e90173f970a0c70208"; StringBuilder errorMessage = new StringBuilder(); assertTrue(MessageSigner.verifyMessage(publicKey, vchSig, message, errorMessage)); assertFalse(MessageSigner.verifyMessage(publicKey, vchSig, "140.59.254.15:999915239445811bd94fd9f0b98eb669fa2c1dc1bda3da99f4c69ed40ce1ccc666e3be757d966d927e90173f970a0c70208", errorMessage)); }
public static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message, StringBuilder errorMessage) { return MessageSigner.verifyMessage(pubkey.getId(), vchSig, message, errorMessage); }
MessageSigner { public static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message, StringBuilder errorMessage) { return MessageSigner.verifyMessage(pubkey.getId(), vchSig, message, errorMessage); } }
MessageSigner { public static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message, StringBuilder errorMessage) { return MessageSigner.verifyMessage(pubkey.getId(), vchSig, message, errorMessage); }  }
MessageSigner { public static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message, StringBuilder errorMessage) { return MessageSigner.verifyMessage(pubkey.getId(), vchSig, message, errorMessage); }  static ECKey getKeysFromSecret(String secret, StringBuilder errorMessage); static MasternodeSignature signMessage(String message, ECKey key); static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message,
                                        StringBuilder errorMessage); static boolean verifyMessage(KeyId pubkeyId, MasternodeSignature vchSig, String message,
                                        StringBuilder errorMessage); static boolean verifyMessage(byte [] pubkeyId, MasternodeSignature vchSig, String message,
                                        StringBuilder errorMessage); }
MessageSigner { public static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message, StringBuilder errorMessage) { return MessageSigner.verifyMessage(pubkey.getId(), vchSig, message, errorMessage); }  static ECKey getKeysFromSecret(String secret, StringBuilder errorMessage); static MasternodeSignature signMessage(String message, ECKey key); static boolean verifyMessage(PublicKey pubkey, MasternodeSignature vchSig, String message,
                                        StringBuilder errorMessage); static boolean verifyMessage(KeyId pubkeyId, MasternodeSignature vchSig, String message,
                                        StringBuilder errorMessage); static boolean verifyMessage(byte [] pubkeyId, MasternodeSignature vchSig, String message,
                                        StringBuilder errorMessage);  }