PUB
- Type of PublicKey
being extractedpublic abstract class AbstractBufferPublicKeyParser<PUB extends java.security.PublicKey> extends java.lang.Object implements BufferPublicKeyParser<PUB>
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<PUB> |
keyClass |
private java.util.Collection<java.lang.String> |
supported |
DEFAULT, EMPTY
Modifier | Constructor and Description |
---|---|
protected |
AbstractBufferPublicKeyParser(java.lang.Class<PUB> keyClass,
java.util.Collection<java.lang.String> supported) |
protected |
AbstractBufferPublicKeyParser(java.lang.Class<PUB> keyClass,
java.lang.String... supported) |
Modifier and Type | Method and Description |
---|---|
protected <S extends java.security.spec.KeySpec> |
generatePublicKey(java.lang.String algorithm,
S keySpec) |
java.lang.Class<PUB> |
getKeyClass() |
protected java.security.KeyFactory |
getKeyFactory(java.lang.String algorithm) |
java.util.Collection<java.lang.String> |
getSupportedKeyTypes() |
boolean |
isKeyTypeSupported(java.lang.String keyType) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
aggregate, getRawPublicKey
private final java.lang.Class<PUB extends java.security.PublicKey> keyClass
private final java.util.Collection<java.lang.String> supported
protected AbstractBufferPublicKeyParser(java.lang.Class<PUB> keyClass, java.lang.String... supported)
protected AbstractBufferPublicKeyParser(java.lang.Class<PUB> keyClass, java.util.Collection<java.lang.String> supported)
public java.util.Collection<java.lang.String> getSupportedKeyTypes()
public final java.lang.Class<PUB> getKeyClass()
public boolean isKeyTypeSupported(java.lang.String keyType)
isKeyTypeSupported
in interface BufferPublicKeyParser<PUB extends java.security.PublicKey>
keyType
- The key type - e.g., "ssh-rsa", "ssh-dss"true
if this key type is supported by the parserprotected <S extends java.security.spec.KeySpec> PUB generatePublicKey(java.lang.String algorithm, S keySpec) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
protected java.security.KeyFactory getKeyFactory(java.lang.String algorithm) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public java.lang.String toString()
toString
in class java.lang.Object