Class AbstractBufferPublicKeyParser<PUB extends PublicKey>
- java.lang.Object
-
- org.apache.sshd.common.util.buffer.keys.AbstractBufferPublicKeyParser<PUB>
-
- Type Parameters:
PUB
- Type ofPublicKey
being extracted
- All Implemented Interfaces:
BufferPublicKeyParser<PUB>
- Direct Known Subclasses:
DSSBufferPublicKeyParser
,ECBufferPublicKeyParser
,ED25519BufferPublicKeyParser
,RSABufferPublicKeyParser
public abstract class AbstractBufferPublicKeyParser<PUB extends PublicKey> extends Object implements BufferPublicKeyParser<PUB>
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
-
Fields inherited from interface org.apache.sshd.common.util.buffer.keys.BufferPublicKeyParser
DEFAULT, EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBufferPublicKeyParser(Class<PUB> keyClass, String... supported)
protected
AbstractBufferPublicKeyParser(Class<PUB> keyClass, Collection<String> supported)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <S extends KeySpec>
PUBgeneratePublicKey(String algorithm, S keySpec)
Class<PUB>
getKeyClass()
protected KeyFactory
getKeyFactory(String algorithm)
Collection<String>
getSupportedKeyTypes()
boolean
isKeyTypeSupported(String keyType)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.util.buffer.keys.BufferPublicKeyParser
getRawPublicKey
-
-
-
-
Method Detail
-
getSupportedKeyTypes
public Collection<String> getSupportedKeyTypes()
-
isKeyTypeSupported
public boolean isKeyTypeSupported(String keyType)
- Specified by:
isKeyTypeSupported
in interfaceBufferPublicKeyParser<PUB extends PublicKey>
- Parameters:
keyType
- The key type - e.g., "ssh-rsa", "ssh-dss"- Returns:
true
if this key type is supported by the parser
-
generatePublicKey
protected <S extends KeySpec> PUB generatePublicKey(String algorithm, S keySpec) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
getKeyFactory
protected KeyFactory getKeyFactory(String algorithm) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
-