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:
KeyPairResourceLoader,KeyPairResourceParser,PGPKeyLoader,PGPPrivateKeyExtractor,PGPPublicKeyExtractor
public class PGPKeyPairResourceParser
extends AbstractKeyPairResourceParser
implements PGPKeyLoader, PGPPublicKeyExtractor, PGPPrivateKeyExtractor
- Author:
- Apache MINA SSHD Project
-
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(NamedResource resourceKey, Collection<? extends org.c02e.jpgpj.Subkey> subKeys) extractKeyPairs(SessionContext session, NamedResource resourceKey, String beginMarker, String endMarker, FilePasswordProvider passwordProvider, InputStream stream, Map<String, String> headers) extractKeyPairs(SessionContext session, NamedResource resourceKey, String beginMarker, String endMarker, 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 java.lang.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 org.apache.sshd.openpgp.PGPKeyLoader
loadPGPKey, loadPGPKey, loadPGPKey, loadPGPKeyMethods inherited from interface org.apache.sshd.openpgp.PGPPrivateKeyExtractor
extractDSSPrivateKey, extractECDSAPrivateKey, extractEdDSAPrivateKey, extractPrivateKey, extractRSAPrivateKeyMethods 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(SessionContext session, NamedResource resourceKey, String beginMarker, String endMarker, FilePasswordProvider passwordProvider, List<String> lines, Map<String, String> headers) throws IOException, GeneralSecurityException- Overrides:
extractKeyPairsin classAbstractKeyPairResourceParser- Throws:
IOExceptionGeneralSecurityException
-
extractKeyPairs
public Collection<KeyPair> extractKeyPairs(SessionContext session, NamedResource resourceKey, String beginMarker, String endMarker, FilePasswordProvider passwordProvider, InputStream stream, Map<String, String> headers) throws IOException, GeneralSecurityException- Specified by:
extractKeyPairsin classAbstractKeyPairResourceParser- Throws:
IOExceptionGeneralSecurityException
-
extractKeyPairs
public List<KeyPair> extractKeyPairs(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
-