public abstract class AbstractPEMResourceKeyPairParser extends AbstractKeyPairResourceParser implements KeyPairPEMResourceParser
logEMPTY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPEMResourceKeyPairParser(String algo,
String algId,
List<String> beginners,
List<String> enders) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
boolean encryptIt) |
Collection<KeyPair> |
extractKeyPairs(String resourceKey,
String beginMarker,
String endMarker,
FilePasswordProvider passwordProvider,
List<String> lines)
Extracts the key pairs within a single delimited by markers block of lines.
|
String |
getAlgorithm() |
String |
getAlgorithmIdentifier() |
canExtractKeyPairs, extractKeyPairs, extractKeyPairs, getBeginners, getEnders, getEndingMarkers, loadKeyPairsgetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaggregate, aggregate, canExtractKeyPairs, containsMarkerLine, containsMarkerLine, extractDataBytes, findMarkerLine, findMarkerLine, joinDataLinesloadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairspublic String getAlgorithm()
getAlgorithm in interface KeyPairPEMResourceParserpublic String getAlgorithmIdentifier()
getAlgorithmIdentifier in interface KeyPairPEMResourceParserpublic Collection<KeyPair> extractKeyPairs(String resourceKey, String beginMarker, String endMarker, FilePasswordProvider passwordProvider, List<String> lines) throws IOException, GeneralSecurityException
AbstractKeyPairResourceParserextractKeyPairs in class AbstractKeyPairResourceParserresourceKey - A hint as to the origin of the text linesbeginMarker - The line containing the begin markerendMarker - The line containing the end markerpasswordProvider - The FilePasswordProvider to use
in case the data is encrypted - may be null if no encryptedlines - The block of lines between the markersKeyPairs - may be null/empty if none.IOException - If failed to parse the dataGeneralSecurityException - If failed to generate the keysAbstractKeyPairResourceParser.extractKeyPairs(String, String, String, FilePasswordProvider, byte[])protected byte[] applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
boolean encryptIt)
throws GeneralSecurityException
GeneralSecurityExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.