Class PGPKeyPairResourceParser
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser
org.apache.sshd.openpgp.PGPKeyPairResourceParser
- All Implemented Interfaces:
org.apache.sshd.common.config.keys.loader.KeyPairResourceLoader, org.apache.sshd.common.config.keys.loader.KeyPairResourceParser, PGPKeyLoader, PGPPrivateKeyExtractor, PGPPublicKeyExtractor
public class PGPKeyPairResourceParser
extends org.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser
implements PGPKeyLoader, PGPPublicKeyExtractor, PGPPrivateKeyExtractor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final PGPKeyPairResourceParserFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.config.keys.loader.KeyPairResourceLoader
MAX_CIPHER_NAME_LENGTH, MAX_KEY_COMMENT_LENGTH, MAX_KEY_TYPE_NAME_LENGTH, MAX_PRIVATE_KEY_DATA_SIZE, MAX_PUBLIC_KEY_DATA_SIZEFields inherited from interface org.apache.sshd.common.config.keys.loader.KeyPairResourceParser
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractKeyPairs(org.apache.sshd.common.NamedResource resourceKey, Collection<? extends org.c02e.jpgpj.Subkey> subKeys) extractKeyPairs(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resourceKey, String beginMarker, String endMarker, org.apache.sshd.common.config.keys.FilePasswordProvider passwordProvider, InputStream stream, Map<String, String> headers) extractKeyPairs(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resourceKey, String beginMarker, String endMarker, org.apache.sshd.common.config.keys.FilePasswordProvider passwordProvider, List<String> lines, Map<String, String> headers) <K extends PrivateKey>
KgeneratePrivateKey(String algorithm, Class<K> keyType, KeySpec keySpec) <K extends PublicKey>
KgeneratePublicKey(String algorithm, Class<K> keyType, KeySpec keySpec) protected KeyFactorygetKeyFactory(String algorithm) Methods inherited from class org.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser
canExtractKeyPairs, extractKeyPairs, getBeginners, getEnders, getEndingMarkers, loadKeyPairs, separateDataLinesFromHeadersMethods inherited from class org.apache.sshd.common.util.logging.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, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.common.config.keys.loader.KeyPairResourceLoader
loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairsMethods inherited from interface PGPKeyLoader
loadPGPKey, loadPGPKey, loadPGPKey, loadPGPKeyMethods inherited from interface PGPPrivateKeyExtractor
extractDSSPrivateKey, extractECDSAPrivateKey, extractEdDSAPrivateKey, extractPrivateKey, extractRSAPrivateKeyMethods inherited from interface PGPPublicKeyExtractor
extractDSSPublicKey, extractECDSAPublicKey, extractECPublicKey, extractEdDSAPublicKey, extractPublicKey, extractRSAPublicKey
-
Field Details
-
BEGIN_MARKER
- See Also:
-
BEGINNERS
-
END_MARKER
- See Also:
-
ENDERS
-
INSTANCE
-
-
Constructor Details
-
PGPKeyPairResourceParser
public PGPKeyPairResourceParser()
-
-
Method Details
-
extractKeyPairs
public Collection<KeyPair> extractKeyPairs(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resourceKey, String beginMarker, String endMarker, org.apache.sshd.common.config.keys.FilePasswordProvider passwordProvider, List<String> lines, Map<String, String> headers) throws IOException, GeneralSecurityException- Overrides:
extractKeyPairsin classorg.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser- Throws:
IOExceptionGeneralSecurityException
-
extractKeyPairs
public Collection<KeyPair> extractKeyPairs(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resourceKey, String beginMarker, String endMarker, org.apache.sshd.common.config.keys.FilePasswordProvider passwordProvider, InputStream stream, Map<String, String> headers) throws IOException, GeneralSecurityException- Specified by:
extractKeyPairsin classorg.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser- Throws:
IOExceptionGeneralSecurityException
-
extractKeyPairs
public List<KeyPair> extractKeyPairs(org.apache.sshd.common.NamedResource resourceKey, Collection<? extends org.c02e.jpgpj.Subkey> subKeys) throws IOException, GeneralSecurityException - Throws:
IOExceptionGeneralSecurityException
-
generatePublicKey
public <K extends PublicKey> K generatePublicKey(String algorithm, Class<K> keyType, KeySpec keySpec) throws GeneralSecurityException - Specified by:
generatePublicKeyin interfacePGPPublicKeyExtractor- Throws:
GeneralSecurityException
-
generatePrivateKey
public <K extends PrivateKey> K generatePrivateKey(String algorithm, Class<K> keyType, KeySpec keySpec) throws GeneralSecurityException - Specified by:
generatePrivateKeyin interfacePGPPrivateKeyExtractor- Throws:
GeneralSecurityException
-
getKeyFactory
- Throws:
GeneralSecurityException
-