Top Description Fields Methods
org.apache.sshd.common.util.buffer.keys

public Interface BufferPublicKeyParser<PUB extends PublicKey>

Known Direct Implementers
org.apache.sshd.common.util.buffer.keys.AbstractBufferPublicKeyParser
Type Parameters
<PUB>
Type of PublicKey being extracted
Imports
java.security.GeneralSecurityException, .NoSuchAlgorithmException, .PublicKey, java.util.Arrays, .Collection, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.buffer.Buffer

Parses a raw PublicKey from a Buffer
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final BufferPublicKeyParser<PublicKey>
public static final BufferPublicKeyParser<PublicKey>

Method Summary

Modifier and TypeMethod and Description
public static BufferPublicKeyParser<PublicKey>
aggregate(Collection<? extends BufferPublicKeyParser<? extends PublicKey>> parsers)

public PUB

Returns:

The decoded PublicKey
getRawPublicKey
(String
The key type - e.g., "ssh-rsa", "ssh-dss"
keyType
,
Buffer
The Buffer containing the encoded raw public key
buffer
)

public boolean

Returns:

true if this key type is supported by the parser
isKeyTypeSupported
(String
The key type - e.g., "ssh-rsa", "ssh-dss"
keyType
)

Field Detail

DEFAULTback to summary
public static final BufferPublicKeyParser<PublicKey> DEFAULT
EMPTYback to summary
public static final BufferPublicKeyParser<PublicKey> EMPTY

Method Detail

aggregateback to summary
public static BufferPublicKeyParser<PublicKey> aggregate(Collection<? extends BufferPublicKeyParser<? extends PublicKey>> parsers)
getRawPublicKeyback to summary
public PUB getRawPublicKey(String keyType, Buffer buffer) throws GeneralSecurityException
Parameters
keyType:String

The key type - e.g., "ssh-rsa", "ssh-dss"

buffer:Buffer

The Buffer containing the encoded raw public key

Returns:PUB

The decoded PublicKey

Exceptions
GeneralSecurityException:
If failed to generate the key
isKeyTypeSupportedback to summary
public boolean isKeyTypeSupported(String keyType)
Parameters
keyType:String

The key type - e.g., "ssh-rsa", "ssh-dss"

Returns:boolean

true if this key type is supported by the parser