verif = new SignatureDSA();
} else if (kp.getFirst().getPublic() instanceof ECPublicKey) {
ECPublicKey pubKey = (ECPublicKey) kp.getFirst().getPublic();
verif = SignatureECDSA.getByCurveSize(pubKey.getParams());
} else if (kp.getFirst().getPublic() instanceof RSAPublicKey) {
verif = new SignatureRSA();
} else {
throw new SshException("Unsupported key type");
}
verif.init(kp.getFirst().getPublic(), kp.getFirst().getPrivate());
verif.update(data, 0, data.length);