@Override public byte[] recoverKey(int recId, byte[] signatureParam, byte[] hashValue) { Signature signature = Signatures.decodeSignatureParameters(new ByteReader(signatureParam)); Sha256Hash hash = new Sha256Hash(hashValue); PublicKey key = SignedMessage.recoverFromSignature(recId, signature, hash, false); if (key != null) { return key.getPublicKeyBytes(); } else { return null; } }