mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
Removed deprecated method
This commit is contained in:
committed by
Jeroen van Erp
parent
bdbd9d7eb5
commit
2984291d84
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user