public class MappedKeyPairProvider extends Object implements KeyPairProvider
| Modifier and Type | Field and Description |
|---|---|
static Transformer<Map<String,KeyPair>,KeyPairProvider> |
MAP_TO_KEY_PAIR_PROVIDER
Transforms a
Map of String->KeyPair to a
KeyPairProvider where map key is the type and value is the
associated KeyPair |
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_RSA| Constructor and Description |
|---|
MappedKeyPairProvider(Map<String,KeyPair> pairsMap) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<String> |
getKeyTypes() |
KeyPair |
loadKey(String type)
Load a key of the specified type which can be "ssh-rsa", "ssh-dss", or
"ecdsa-sha2-nistp{256,384,521}".
|
Iterable<KeyPair> |
loadKeys()
Load available keys.
|
String |
toString() |
public static final Transformer<Map<String,KeyPair>,KeyPairProvider> MAP_TO_KEY_PAIR_PROVIDER
Map of String->KeyPair to a
KeyPairProvider where map key is the type and value is the
associated KeyPairpublic Iterable<KeyPair> loadKeys()
KeyPairProviderloadKeys in interface KeyPairProviderIterable instance of available keys, never nullpublic KeyPair loadKey(String type)
KeyPairProvidernullloadKey in interface KeyPairProvidertype - the type of key to loadnullpublic Iterable<String> getKeyTypes()
getKeyTypes in interface KeyPairProviderIterable key types in preferred order - never nullCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.