Enum BuiltinIdentities

java.lang.Object
java.lang.Enum<BuiltinIdentities>
org.apache.sshd.common.config.keys.BuiltinIdentities
All Implemented Interfaces:
Serializable, Comparable<BuiltinIdentities>, AlgorithmNameProvider, Identity, KeyTypeNamesSupport, NamedResource, OptionalFeature

public enum BuiltinIdentities extends Enum<BuiltinIdentities> implements Identity
Author:
Apache MINA SSHD Project
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static BuiltinIdentities[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BuiltinIdentities valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public final String getName()
      Specified by:
      getName in interface NamedResource
      Returns:
      The resource name
    • isSupported

      public boolean isSupported()
      Specified by:
      isSupported in interface OptionalFeature
    • getSupportedKeyTypes

      public NavigableSet<String> getSupportedKeyTypes()
      Specified by:
      getSupportedKeyTypes in interface KeyTypeNamesSupport
      Returns:
      The case insensitive NavigableSet of OpenSSH key type names that are supported by this decoder - e.g., ssh-rsa, ssh-dss, ecdsa-sha2-nistp384. This is not a single name - e.g., ECDSA keys have several curve names. Caveat: this collection may be un-modifiable...
    • getAlgorithm

      public String getAlgorithm()
      Specified by:
      getAlgorithm in interface AlgorithmNameProvider
    • fromName

      public static BuiltinIdentities fromName(String name)
      Parameters:
      name - The identity name - ignored if null/empty
      Returns:
      The matching BuiltinIdentities whose getName() value matches case insensitive or null if no match found
    • fromAlgorithm

      public static BuiltinIdentities fromAlgorithm(String algorithm)
      Parameters:
      algorithm - The algorithm - ignored if null/empty
      Returns:
      The matching BuiltinIdentities whose getAlgorithm() value matches case insensitive or null if no match found
    • fromKeyPair

      public static BuiltinIdentities fromKeyPair(KeyPair kp)
      Parameters:
      kp - The KeyPair - ignored if null
      Returns:
      The matching BuiltinIdentities provided both public and private keys are of the same type - null if no match could be found
      See Also:
    • fromKey

      public static BuiltinIdentities fromKey(Key key)
      Parameters:
      key - The Key instance - ignored if null
      Returns:
      The matching BuiltinIdentities whose either public or private key type matches the requested one or null if no match found