Package org.apache.sshd.openpgp
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 String
static final String
static final PGPKeyPairResourceParser
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields 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_SIZE
Fields 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 KeyFactory
getKeyFactory
(String algorithm) Methods inherited from class org.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser
canExtractKeyPairs, extractKeyPairs, getBeginners, getEnders, getEndingMarkers, loadKeyPairs, separateDataLinesFromHeaders
Methods 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, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.config.keys.loader.KeyPairResourceLoader
loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs
Methods inherited from interface org.apache.sshd.openpgp.PGPKeyLoader
loadPGPKey, loadPGPKey, loadPGPKey, loadPGPKey
Methods inherited from interface org.apache.sshd.openpgp.PGPPrivateKeyExtractor
extractDSSPrivateKey, extractECDSAPrivateKey, extractEdDSAPrivateKey, extractPrivateKey, extractRSAPrivateKey
Methods inherited from interface org.apache.sshd.openpgp.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:
extractKeyPairs
in classorg.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser
- Throws:
IOException
GeneralSecurityException
-
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:
extractKeyPairs
in classorg.apache.sshd.common.config.keys.loader.AbstractKeyPairResourceParser
- Throws:
IOException
GeneralSecurityException
-
extractKeyPairs
public List<KeyPair> extractKeyPairs(org.apache.sshd.common.NamedResource resourceKey, Collection<? extends org.c02e.jpgpj.Subkey> subKeys) throws IOException, GeneralSecurityException - Throws:
IOException
GeneralSecurityException
-
generatePublicKey
public <K extends PublicKey> K generatePublicKey(String algorithm, Class<K> keyType, KeySpec keySpec) throws GeneralSecurityException - Specified by:
generatePublicKey
in interfacePGPPublicKeyExtractor
- Throws:
GeneralSecurityException
-
generatePrivateKey
public <K extends PrivateKey> K generatePrivateKey(String algorithm, Class<K> keyType, KeySpec keySpec) throws GeneralSecurityException - Specified by:
generatePrivateKey
in interfacePGPPrivateKeyExtractor
- Throws:
GeneralSecurityException
-
getKeyFactory
- Throws:
GeneralSecurityException
-