PublicKey whose data is formatted according to the
OpenSSH format:
<key-type> <base64-encoded-public-key-data>
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final char | COMMENT_CHAR
Character used to denote a comment line in the keys file |
| private static final NavigableMap | |
| private byte[] | |
| private PublicKeyEntryDataResolver | |
| private String | |
| public static final String | PUBKEY_FILE_SUFFIX
Standard suffix for SSH public key files |
| private static final long | |
| public static final String | STD_KEYFILE_FOLDER_NAME
Standard folder name used by OpenSSH to hold key files |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PublicKey | appendPublicKey(SessionContext
The session, Appendable SessionContext for invoking this command - may be null if
not invoked within a session context (e.g., offline tool or session unknown).The sb, PublicKeyEntryResolver Appendable instance to encode the data intoThe fallbackResolver)PublicKeyEntryResolver to consult if none of the built-in ones can
be used. If null and no built-in resolver can be used then an
InvalidKeySpecException is thrown.
|
| public static < The generic appendable class A extends Appendable> A | Returns: The updated appendable instanceThe sb, PublicKey Appendable instance to encode the data intoThe key)PublicKey - ignored if nullEncodes a public key data the same way as the |
| public static < The generic appendable class A extends Appendable> A | Returns: The updated appendable instanceThe sb, PublicKey Appendable instance to encode the data intoThe key, PublicKeyEntryDataResolver PublicKey - ignored if nullThe encoder)PublicKeyEntryDataResolver to use in order to encode the key data bytes into a
string representation - if null then one is automatically
resolved
|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public static Path | Returns: The default OpenSSH folder used to hold key files - e.g.,known_hosts, authorized_keys,
etc.
|
| public byte[] | |
| public static PublicKeyEntryDataResolver | Returns: The registered resolver instance -null if none was registeredThe key-type value (case insensitive) that may have been previously
keyType)registered - e.g.,
"ssh-rsa", "pgp-sign-dss", etc.
|
| public PublicKeyEntryDataResolver | |
| public String | |
| public static NavigableMap | Returns: A snapshot of the currently registered specializedPublicKeyEntryDataResolver-s, where key=the
key-type value (case insensitive) - e.g., "ssh-rsa", "pgp-sign-dss", etc.,
value=the associated PublicKeyEntryDataResolver for the key type
|
| public int | |
| protected boolean | |
| public static PublicKeyEntry | parsePublicKeyEntry(String
Assumed to contain at least encData)key-type base64-data (anything beyond the
BASE64 data is ignored) - ignored if null/empty
|
| public static PublicKeyEntry | parsePublicKeyEntry(String
Assumed to contain at least encData, PublicKeyEntryDataResolver key-type base64-data (anything beyond the
BASE64 data is ignored) - ignored if null/emptyThe decoder)PublicKeyEntryDataResolver to use in order to decode the key data
string into its bytes - if null then one is automatically
resolved
|
| public static < The generic entry type E extends PublicKeyEntry> E | Returns: The updated entry instanceThe entry, String PublicKeyEntry whose contents are to be updated - ignored if
nullAssumed to contain at least encData)key-type base64-data (anything beyond the
BASE64 data is ignored) - ignored if null/empty
|
| public static < The generic entry type E extends PublicKeyEntry> E | Returns: The updated entry instanceThe entry, String PublicKeyEntry whose contents are to be updated - ignored if
nullAssumed to contain at least encData, PublicKeyEntryDataResolver key-type base64-data (anything beyond the
BASE64 data is ignored) - ignored if null/emptyThe decoder)PublicKeyEntryDataResolver to use in order to decode the key data
string into its bytes - if null then one is automatically
resolved
|
| public static void | registerKeyDataEntryResolver(String
The key-type value (case insensitive) that will trigger the usage of this decoder - e.g.,
"ssh-rsa", "pgp-sign-dss", etc. keyType, PublicKeyEntryDataResolver The decoder to use resolver)Registers a specialized decoder for the public key entry data bytes instead of the
|
| public static PublicKeyEntryDataResolver | Returns: If a specific resolver has been previouslyregistered then uses
it, otherwise the default one.keyType The key-type value (case insensitive) whose data is to be resolved - e.g.,
"ssh-rsa", "pgp-sign-dss", etc. keyType)
|
| public PublicKey | Returns: The resolvedPublicKey - or null if could not be resolvedNote may be called only after key type and data bytes have been set or exception(s) may be thrown The session, Map<String, String> SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool or session unknown).Any headers that may have been available when data was read headers, PublicKeyEntryResolver The fallbackResolver)PublicKeyEntryResolver to consult if none of the built-in ones can
be used. If null and no built-in resolver can be used then an
InvalidKeySpecException is thrown.
|
| public static List | resolvePublicKeyEntries(SessionContext
The session, Collection<? extends PublicKeyEntry> SessionContext for invoking this command - may be null if
not invoked within a session context (e.g., offline tool or session unknown).The entries to convert - ignored if entries, PublicKeyEntryResolver null/emptyThe fallbackResolver)PublicKeyEntryResolver to consult if none of the built-in ones can
be used. If null and no built-in resolver can be used then an
InvalidKeySpecException is thrown.
|
| public PublicKeyEntryDataResolver | Returns: The resolved instanceIf a |
| public void | |
| public void | |
| public void | |
| public String | |
| public static String | |
| public static String | Returns: TheOpenSSH encoded dataThe key, PublicKeyEntryDataResolver PublicKeyThe encoder)PublicKeyEntryDataResolver to use in order to encode the key data
bytes into a string representation - if null then one is automatically
resolved
|
| public static PublicKeyEntryDataResolver | Returns: The un-registered resolver instance -null if none was registeredThe key-type value (case insensitive) that may have been previously
keyType)registered - e.g.,
"ssh-rsa", "pgp-sign-dss", etc.
|
| COMMENT_CHAR | back to summary |
|---|---|
| public static final char COMMENT_CHAR Character used to denote a comment line in the keys file | |
| KEY_DATA_RESOLVERS | back to summary |
|---|---|
| private static final NavigableMap<String, PublicKeyEntryDataResolver> KEY_DATA_RESOLVERS | |
| keyData | back to summary |
|---|---|
| private byte[] keyData | |
| keyDataResolver | back to summary |
|---|---|
| private PublicKeyEntryDataResolver keyDataResolver | |
| keyType | back to summary |
|---|---|
| private String keyType | |
| PUBKEY_FILE_SUFFIX | back to summary |
|---|---|
| public static final String PUBKEY_FILE_SUFFIX Standard suffix for SSH public key files | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| STD_KEYFILE_FOLDER_NAME | back to summary |
|---|---|
| public static final String STD_KEYFILE_FOLDER_NAME Standard folder name used by OpenSSH to hold key files | |
| PublicKeyEntry | back to summary |
|---|---|
| public PublicKeyEntry() | |
| PublicKeyEntry | back to summary |
|---|---|
| public PublicKeyEntry(String keyType, byte... keyData) | |
| appendPublicKey | back to summary |
|---|---|
public PublicKey appendPublicKey(SessionContext session, Appendable sb, PublicKeyEntryResolver fallbackResolver) throws IOException, GeneralSecurityException
| |
| appendPublicKeyEntry | back to summary |
|---|---|
| public static <A extends Appendable> A appendPublicKeyEntry(A sb, PublicKey key) throws IOException Encodes a public key data the same way as the
| |
| appendPublicKeyEntry | back to summary |
|---|---|
public static <A extends Appendable> A appendPublicKeyEntry(A sb, PublicKey key, PublicKeyEntryDataResolver encoder) throws IOException
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDefaultKeysFolderPath | back to summary |
|---|---|
public static Path getDefaultKeysFolderPath()
| |
| getKeyData | back to summary |
|---|---|
| public byte[] getKeyData() | |
| getKeyDataEntryResolver | back to summary |
|---|---|
public static PublicKeyEntryDataResolver getKeyDataEntryResolver(String keyType)
| |
| getKeyDataResolver | back to summary |
|---|---|
| public PublicKeyEntryDataResolver getKeyDataResolver() | |
| getKeyType | back to summary |
|---|---|
| public String getKeyType() Implements org.
| |
| getRegisteredKeyDataEntryResolvers | back to summary |
|---|---|
public static NavigableMap
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isEquivalent | back to summary |
|---|---|
| protected boolean isEquivalent(PublicKeyEntry e) | |
| parsePublicKeyEntry | back to summary |
|---|---|
public static PublicKeyEntry parsePublicKeyEntry(String encData) throws IllegalArgumentException
| |
| parsePublicKeyEntry | back to summary |
|---|---|
public static PublicKeyEntry parsePublicKeyEntry(String encData, PublicKeyEntryDataResolver decoder) throws IllegalArgumentException
| |
| parsePublicKeyEntry | back to summary |
|---|---|
public static <E extends PublicKeyEntry> E parsePublicKeyEntry(E entry, String encData) throws IllegalArgumentException
| |
| parsePublicKeyEntry | back to summary |
|---|---|
public static <E extends PublicKeyEntry> E parsePublicKeyEntry(E entry, String encData, PublicKeyEntryDataResolver decoder) throws IllegalArgumentException
| |
| registerKeyDataEntryResolver | back to summary |
|---|---|
| public static void registerKeyDataEntryResolver(String keyType, PublicKeyEntryDataResolver resolver) Registers a specialized decoder for the public key entry data bytes instead of the
| |
| resolveKeyDataEntryResolver | back to summary |
|---|---|
public static PublicKeyEntryDataResolver resolveKeyDataEntryResolver(String keyType)
| |
| resolvePublicKey | back to summary |
|---|---|
public PublicKey resolvePublicKey(SessionContext session, Map<String, String> headers, PublicKeyEntryResolver fallbackResolver) throws IOException, GeneralSecurityException
| |
| resolvePublicKeyEntries | back to summary |
|---|---|
public static List
| |
| resolvePublicKeyEntryDataResolver | back to summary |
|---|---|
| public PublicKeyEntryDataResolver resolvePublicKeyEntryDataResolver() If a
| |
| setKeyData | back to summary |
|---|---|
| public void setKeyData(byte[] value) | |
| setKeyDataResolver | back to summary |
|---|---|
| public void setKeyDataResolver(PublicKeyEntryDataResolver keyDataResolver) | |
| setKeyType | back to summary |
|---|---|
| public void setKeyType(String value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toString | back to summary |
|---|---|
public static String toString(PublicKey key) throws IllegalArgumentException
| |
| toString | back to summary |
|---|---|
public static String toString(PublicKey key, PublicKeyEntryDataResolver encoder) throws IllegalArgumentException
| |
| unregisterKeyDataEntryResolver | back to summary |
|---|---|
public static PublicKeyEntryDataResolver unregisterKeyDataEntryResolver(String keyType)
| |
| Access | Constructor and Description |
|---|---|
| private |
| PATH | back to summary |
|---|---|
| private static final Path PATH | |
| LazyDefaultKeysFolderHolder | back to summary |
|---|---|
| private LazyDefaultKeysFolderHolder() | |