Top Fields Constructors Methods
org.apache.sshd.common.config.keys.impl

public Class SkED25519PublicKeyEntryDecoder

extends AbstractPublicKeyEntryDecoder<SkED25519PublicKey, PrivateKey>
Class Inheritance
Imports
java.io.IOException, .InputStream, .OutputStream, java.security.GeneralSecurityException, .KeyFactory, .KeyPair, .KeyPairGenerator, .PrivateKey, java.security.spec.InvalidKeySpecException, java.util.Collections, .Map, .Objects, net.i2p.crypto.eddsa.EdDSAPublicKey, org.apache.sshd.common.config.keys.KeyEntryResolver, org.apache.sshd.common.config.keys.u2f.SkED25519PublicKey, org.apache.sshd.common.keyprovider.KeyPairProvider, org.apache.sshd.common.session.SessionContext, org.apache.sshd.common.util.security.eddsa.Ed25519PublicKeyDecoder

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final SkED25519PublicKeyEntryDecoder
public static final String
public static final int
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PrivateKey
public SkED25519PublicKey
public SkED25519PublicKey
decodePublicKey(SessionContext
The SessionContext for invoking this command - may be null if not invoked within a session context (e.g., offline tool or session unknown).
session
,
String
The reported / encode key type
keyType
,
InputStream
The key data bytes stream positioned after the key type decoding and making sure it is one of the supported types
keyData
,
Map<String, String>
Any headers that may have been available when data was read
headers
)

Implements org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

public String
encodePublicKey(OutputStream
The OutputStream to write the data to
s
,
SkED25519PublicKey
The PublicKey - may not be null
key
)

Implements org.apache.sshd.common.config.keys.PublicKeyEntryDecoder.encodePublicKey.

Encodes the PublicKey using the OpenSSH format - same one used by the decodePublicKey method(s)

public KeyPair
public KeyFactory
public KeyPairGenerator
Inherited from org.apache.sshd.common.config.keys.impl.AbstractPublicKeyEntryDecoder:
parseBooleanHeader

Field Detail

INSTANCEback to summary
public static final SkED25519PublicKeyEntryDecoder INSTANCE
KEY_TYPEback to summary
public static final String KEY_TYPE
MAX_APP_NAME_LENGTHback to summary
public static final int MAX_APP_NAME_LENGTH
NO_TOUCH_REQUIRED_HEADERback to summary
private static final String NO_TOUCH_REQUIRED_HEADER

Constructor Detail

SkED25519PublicKeyEntryDecoderback to summary
public SkED25519PublicKeyEntryDecoder()

Method Detail

clonePrivateKeyback to summary
public PrivateKey clonePrivateKey(PrivateKey key)

Implements org.apache.sshd.common.config.keys.KeyEntryResolver.clonePrivateKey.

Parameters
key:PrivateKey

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.clonePrivateKey.

The PrivateKey to clone - ignored if null

Returns:PrivateKey

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.clonePrivateKey.

The cloned key (or null if no original key)

Annotations
@Override
clonePublicKeyback to summary
public SkED25519PublicKey clonePublicKey(SkED25519PublicKey key)

Implements org.apache.sshd.common.config.keys.KeyEntryResolver.clonePublicKey.

Parameters
key:SkED25519PublicKey

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.clonePublicKey.

The PublicKey to clone - ignored if null

Returns:SkED25519PublicKey

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.clonePublicKey.

The cloned key (or null if no original key)

Annotations
@Override
decodePublicKeyback to summary
public SkED25519PublicKey decodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String, String> headers) throws IOException, GeneralSecurityException

Implements org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

Parameters
session:SessionContext

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

The SessionContext for invoking this command - may be null if not invoked within a session context (e.g., offline tool or session unknown).

keyType:String

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

The reported / encode key type

keyData:InputStream

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

The key data bytes stream positioned after the key type decoding and making sure it is one of the supported types

headers:Map<String, String>

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

Any headers that may have been available when data was read

Returns:SkED25519PublicKey

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

The decoded PublicKey

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

If failed to read from the data stream

GeneralSecurityException:

Doc from org.apache.sshd.common.config.keys.PublicKeyRawDataDecoder.decodePublicKey.

If failed to generate the key

encodePublicKeyback to summary
public String encodePublicKey(OutputStream s, SkED25519PublicKey key) throws IOException

Implements org.apache.sshd.common.config.keys.PublicKeyEntryDecoder.encodePublicKey.

Doc from org.apache.sshd.common.config.keys.PublicKeyEntryDecoder.encodePublicKey.

Encodes the PublicKey using the OpenSSH format - same one used by the decodePublicKey method(s)

Parameters
s:OutputStream

The OutputStream to write the data to

key:SkED25519PublicKey

The PublicKey - may not be null

Returns:String

The key type value - one of the getSupportedKeyTypes()

Annotations
@Override
Exceptions
IOException:
If failed to generate the encoding
generateKeyPairback to summary
public KeyPair generateKeyPair(int keySize)

Overrides default org.apache.sshd.common.config.keys.KeyEntryResolver.generateKeyPair.

Parameters
keySize:int

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.generateKeyPair.

Key size in bits

Returns:KeyPair

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.generateKeyPair.

A KeyPair with the specified key size

Annotations
@Override
getKeyFactoryInstanceback to summary
public KeyFactory getKeyFactoryInstance()

Implements org.apache.sshd.common.config.keys.KeyEntryResolver.getKeyFactoryInstance.

Returns:KeyFactory

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.getKeyFactoryInstance.

A KeyFactory suitable for the specific decoder type

Annotations
@Override
getKeyPairGeneratorback to summary
public KeyPairGenerator getKeyPairGenerator()

Implements org.apache.sshd.common.config.keys.KeyEntryResolver.getKeyPairGenerator.

Returns:KeyPairGenerator

Doc from org.apache.sshd.common.config.keys.KeyEntryResolver.getKeyPairGenerator.

A KeyPairGenerator suitable for this decoder

Annotations
@Override