Class SkED25519PublicKeyEntryDecoder
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.config.keys.impl.AbstractIdentityResourceLoader<SkED25519PublicKey, PrivateKey>
org.apache.sshd.common.config.keys.impl.AbstractKeyEntryResolver<SkED25519PublicKey, PrivateKey>
org.apache.sshd.common.config.keys.impl.AbstractPublicKeyEntryDecoder<SkED25519PublicKey, PrivateKey>
org.apache.sshd.common.config.keys.impl.SkED25519PublicKeyEntryDecoder
- All Implemented Interfaces:
IdentityResourceLoader<SkED25519PublicKey, PrivateKey>, KeyEntryResolver<SkED25519PublicKey, PrivateKey>, KeyTypeNamesSupport, PublicKeyEntryDecoder<SkED25519PublicKey, PrivateKey>, PublicKeyEntryResolver, PublicKeyRawDataDecoder<SkED25519PublicKey>
public class SkED25519PublicKeyEntryDecoder
extends AbstractPublicKeyEntryDecoder<SkED25519PublicKey, PrivateKey>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SkED25519PublicKeyEntryDecoderstatic final Stringstatic final intprivate static final StringFields inherited from class AbstractLoggingBean
logFields inherited from interface IdentityResourceLoader
MAX_BIGINT_OCTETS_COUNTFields inherited from interface PublicKeyEntryResolver
FAILING, IGNORING, UNSUPPORTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String, String> headers) generateKeyPair(int keySize) Methods inherited from class AbstractPublicKeyEntryDecoder
parseBooleanHeaderMethods inherited from class AbstractKeyEntryResolver
generatePrivateKey, generatePublicKey, toStringMethods inherited from class AbstractIdentityResourceLoader
getPrivateKeyType, getPublicKeyType, getSupportedKeyTypesMethods inherited from class AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IdentityResourceLoader
getPrivateKeyType, getPublicKeyTypeMethods inherited from interface KeyEntryResolver
cloneKeyPairMethods inherited from interface KeyTypeNamesSupport
getSupportedKeyTypesMethods inherited from interface PublicKeyEntryDecoder
decodePublicKeyByType, resolveMethods inherited from interface PublicKeyRawDataDecoder
decodePublicKey, decodePublicKey
-
Field Details
-
KEY_TYPE
- See Also:
-
MAX_APP_NAME_LENGTH
public static final int MAX_APP_NAME_LENGTH- See Also:
-
INSTANCE
-
NO_TOUCH_REQUIRED_HEADER
- See Also:
-
-
Constructor Details
-
SkED25519PublicKeyEntryDecoder
public SkED25519PublicKeyEntryDecoder()
-
-
Method Details
-
decodePublicKey
public SkED25519PublicKey decodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String, String> headers) throws IOException, GeneralSecurityException- Parameters:
session- TheSessionContextfor invoking this command - may benullif not invoked within a session context (e.g., offline tool or session unknown).keyType- The reported / encode key typekeyData- The key data bytes stream positioned after the key type decoding and making sure it is one of the supported typesheaders- Any headers that may have been available when data was read- Returns:
- The decoded
PublicKey - Throws:
IOException- If failed to read from the data streamGeneralSecurityException- If failed to generate the key
-
clonePublicKey
- Parameters:
key- ThePublicKeyto clone - ignored ifnull- Returns:
- The cloned key (or
nullif no original key)
-
encodePublicKey
Description copied from interface:PublicKeyEntryDecoder- Parameters:
s- TheOutputStreamto write the data tokey- ThePublicKey- may not benull- Returns:
- The key type value - one of the
KeyTypeNamesSupport.getSupportedKeyTypes() - Throws:
IOException- If failed to generate the encoding
-
clonePrivateKey
- Parameters:
key- ThePrivateKeyto clone - ignored ifnull- Returns:
- The cloned key (or
nullif no original key)
-
getKeyFactoryInstance
- Returns:
- A
KeyFactorysuitable for the specific decoder type
-
generateKeyPair
-
getKeyPairGenerator
- Returns:
- A
KeyPairGeneratorsuitable for this decoder
-