Package com.trilead.ssh2.signature
Class KeyAlgorithm<U extends PublicKey,R extends PrivateKey>
- java.lang.Object
-
- com.trilead.ssh2.signature.KeyAlgorithm<U,R>
-
- Direct Known Subclasses:
DSAKeyAlgorithm,ECDSAKeyAlgorithm,ED25519KeyAlgorithm,RSAKeyAlgorithm
public abstract class KeyAlgorithm<U extends PublicKey,R extends PrivateKey> extends Object
- Author:
- Michael Clarke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract UdecodePublicKey(byte[] encodedPublicKey)abstract byte[]decodeSignature(byte[] encodedSignature)abstract byte[]encodePublicKey(U publicKey)abstract byte[]encodeSignature(byte[] signature)byte[]generateSignature(byte[] message, R pk, SecureRandom rnd)abstract List<CertificateDecoder>getCertificateDecoders()StringgetKeyFormat()booleansupportsKey(PrivateKey key)booleanverifySignature(byte[] message, byte[] ds, U dpk)
-
-
-
Method Detail
-
generateSignature
public byte[] generateSignature(byte[] message, R pk, SecureRandom rnd) throws IOException- Throws:
IOException
-
verifySignature
public boolean verifySignature(byte[] message, byte[] ds, U dpk) throws IOException- Throws:
IOException
-
getKeyFormat
public String getKeyFormat()
-
encodeSignature
public abstract byte[] encodeSignature(byte[] signature) throws IOException- Throws:
IOException
-
decodeSignature
public abstract byte[] decodeSignature(byte[] encodedSignature) throws IOException- Throws:
IOException
-
encodePublicKey
public abstract byte[] encodePublicKey(U publicKey) throws IOException
- Throws:
IOException
-
decodePublicKey
public abstract U decodePublicKey(byte[] encodedPublicKey) throws IOException
- Throws:
IOException
-
getCertificateDecoders
public abstract List<CertificateDecoder> getCertificateDecoders()
-
supportsKey
public boolean supportsKey(PrivateKey key)
-
-