Class AbstractBufferPublicKeyParser<PUB extends PublicKey>
- java.lang.Object
-
- org.apache.sshd.common.util.buffer.keys.AbstractBufferPublicKeyParser<PUB>
-
- Type Parameters:
PUB- Type ofPublicKeybeing extracted
- All Implemented Interfaces:
BufferPublicKeyParser<PUB>
- Direct Known Subclasses:
DSSBufferPublicKeyParser,ECBufferPublicKeyParser,ED25519BufferPublicKeyParser,OpenSSHCertPublicKeyParser,RSABufferPublicKeyParser,SkECBufferPublicKeyParser,SkED25519BufferPublicKeyParser
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 protectedAbstractBufferPublicKeyParser(Class<PUB> keyClass, String... supported)protectedAbstractBufferPublicKeyParser(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 KeyFactorygetKeyFactory(String algorithm)Collection<String>getSupportedKeyTypes()booleanisKeyTypeSupported(String keyType)StringtoString()-
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:
isKeyTypeSupportedin interfaceBufferPublicKeyParser<PUB extends PublicKey>- Parameters:
keyType- The key type - e.g., "ssh-rsa", "ssh-dss"- Returns:
trueif 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
-
-