@FunctionalInterface public interface KeyPairResourceLoader
KeyPair
s from text resourcesModifier and Type | Field and Description |
---|---|
static KeyPairResourceLoader |
EMPTY
An empty loader that never fails but always returns an empty list
|
static int |
MAX_CIPHER_NAME_LENGTH |
static int |
MAX_KEY_COMMENT_LENGTH |
static int |
MAX_KEY_TYPE_NAME_LENGTH |
static int |
MAX_PRIVATE_KEY_DATA_SIZE |
static int |
MAX_PUBLIC_KEY_DATA_SIZE |
static final int MAX_CIPHER_NAME_LENGTH
static final int MAX_KEY_TYPE_NAME_LENGTH
static final int MAX_KEY_COMMENT_LENGTH
static final int MAX_PUBLIC_KEY_DATA_SIZE
static final int MAX_PRIVATE_KEY_DATA_SIZE
static final KeyPairResourceLoader EMPTY
default Collection<KeyPair> loadKeyPairs(SessionContext session, Path path, FilePasswordProvider passwordProvider, OpenOption... options) throws IOException, GeneralSecurityException
session
- The SessionContext
for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool or session unknown).path
- The private key file Path
passwordProvider
- The FilePasswordProvider
to use in case the data is encrypted - may be
null
if no encrypted data is expectedoptions
- The OpenOption
-s to use to access the file dataKeyPair
s - may be null
/empty if none. Note:
the resource loader may decide to skip unknown lines if more than one key pair
type is encoded in itIOException
- If failed to process the linesGeneralSecurityException
- If failed to generate the keys from the parsed datadefault Collection<KeyPair> loadKeyPairs(SessionContext session, Path path, FilePasswordProvider passwordProvider, Charset cs, OpenOption... options) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, URL url, FilePasswordProvider passwordProvider) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, URL url, FilePasswordProvider passwordProvider, Charset cs) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, IoResource<?> resource, FilePasswordProvider passwordProvider) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, IoResource<?> resource, FilePasswordProvider passwordProvider, Charset cs) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, NamedResource resourceKey, FilePasswordProvider passwordProvider, String data) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, NamedResource resourceKey, FilePasswordProvider passwordProvider, InputStream stream) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, NamedResource resourceKey, FilePasswordProvider passwordProvider, InputStream stream, Charset cs) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, NamedResource resourceKey, FilePasswordProvider passwordProvider, Reader r) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
default Collection<KeyPair> loadKeyPairs(SessionContext session, NamedResource resourceKey, FilePasswordProvider passwordProvider, BufferedReader r) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
Collection<KeyPair> loadKeyPairs(SessionContext session, NamedResource resourceKey, FilePasswordProvider passwordProvider, List<String> lines) throws IOException, GeneralSecurityException
session
- The SessionContext
for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool or session unknown).resourceKey
- A hint as to the origin of the text linespasswordProvider
- The FilePasswordProvider
to use in case the data is encrypted - may be
null
if no encrypted data is expectedlines
- The List
of lines as read from the resourceKeyPair
s - may be null
/empty if none. Note:
the resource loader may decide to skip unknown lines if more than one key pair
type is encoded in itIOException
- If failed to process the linesGeneralSecurityException
- If failed to generate the keys from the parsed dataCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.