### Question:
EDKeyPair implements IKeyPair { @Override public boolean verifySignature(byte[] message, byte[] sigBytes) { try { EdDSAEngine sgr = new EdDSAEngine(MessageDigest.getInstance("SHA-512")); sgr.initVerify(new EdDSAPublicKey(new EdDSAPublicKeySpec(keySpec.getA(), ed25519))); sgr.update(message); return sgr.verify(sigBytes); } catch (Exception e) { throw new RuntimeException(e); } } EDKeyPair(EdDSAPrivateKeySpec keySpec); static EDKeyPair from256Seed(byte[] seedBytes); static EDKeyPair from128Seed(byte[] seedBytes); @Override String canonicalPubHex(); @Override BigInteger pub(); @Override String pubHex(); @Override String privHex(); @Override BigInteger priv(); @Override boolean verifySignature(byte[] message, byte[] sigBytes); @Override byte[] signMessage(byte[] message); @Override byte[] canonicalPubBytes(); @Override byte[] pub160Hash(); final EdDSAPrivateKeySpec keySpec; static final EdDSANamedCurveSpec ed25519; }### Answer:
@Test public void testVerifying() { assertTrue(edKeyPair.verifySignature(message, B16.decode(expectedSig))); }