Removed deprecated method

This commit is contained in:
Charles Gould
2017-09-07 16:25:05 -04:00
committed by Jeroen van Erp
parent bdbd9d7eb5
commit 2984291d84
3 changed files with 0 additions and 39 deletions

View File

@@ -47,21 +47,6 @@ public class SignatureEdDSA implements Signature {
}
}
@Override
public void init(PublicKey pubkey, PrivateKey prvkey) {
try {
if (pubkey != null) {
engine.initVerify(pubkey);
}
if (prvkey != null) {
engine.initSign(prvkey);
}
} catch (InvalidKeyException e) {
throw new SSHRuntimeException(e);
}
}
@Override
public void initVerify(PublicKey pubkey) {
try {

View File

@@ -34,19 +34,6 @@ public abstract class AbstractSignature
this.algorithm = algorithm;
}
@Override
public void init(PublicKey publicKey, PrivateKey privateKey) {
try {
signature = SecurityUtils.getSignature(algorithm);
if (publicKey != null)
signature.initVerify(publicKey);
if (privateKey != null)
signature.initSign(privateKey);
} catch (GeneralSecurityException e) {
throw new SSHRuntimeException(e);
}
}
@Override
public void initVerify(PublicKey publicKey) {
try {

View File

@@ -21,17 +21,6 @@ import java.security.PublicKey;
/** Signature interface for SSH used to sign or verify data. Usually wraps a {@code javax.crypto.Signature} object. */
public interface Signature {
/**
* Initialize this signature with the given public key and private key. If the private key is null, only signature
* verification can be performed.
*
* @param pubkey (null-ok) specify in case verification is needed
* @param prvkey (null-ok) specify in case signing is needed
* @deprecated Use {@link #initVerify(PublicKey)} or {@link #initSign(PrivateKey)} instead.
*/
@Deprecated
void init(PublicKey pubkey, PrivateKey prvkey);
/**
* Initialize this signature with the given public key for signature verification.
*