public abstract class AbstractPEMResourceKeyPairParser extends AbstractKeyPairResourceParser implements KeyPairPEMResourceParser
log
EMPTY
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, loadKeyPairs
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aggregate, aggregate, canExtractKeyPairs, containsMarkerLine, containsMarkerLine, extractDataBytes, findMarkerLine, findMarkerLine, joinDataLines
loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs, loadKeyPairs
public String getAlgorithm()
getAlgorithm
in interface KeyPairPEMResourceParser
public String getAlgorithmIdentifier()
getAlgorithmIdentifier
in interface KeyPairPEMResourceParser
public Collection<KeyPair> extractKeyPairs(String resourceKey, String beginMarker, String endMarker, FilePasswordProvider passwordProvider, List<String> lines) throws IOException, GeneralSecurityException
AbstractKeyPairResourceParser
extractKeyPairs
in class AbstractKeyPairResourceParser
resourceKey
- 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 markersKeyPair
s - 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
GeneralSecurityException
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.