Enum Class KeyType

java.lang.Object
java.lang.Enum<KeyType>
net.schmizz.sshj.common.KeyType
All Implemented Interfaces:
Serializable, Comparable<KeyType>, Constable

public enum KeyType extends Enum<KeyType>
Type of key e.g. rsa, dsa
  • Enum Constant Details

    • RSA

      public static final KeyType RSA
      SSH identifier for RSA keys
    • DSA

      public static final KeyType DSA
      SSH identifier for DSA keys
    • ECDSA256

      public static final KeyType ECDSA256
      SSH identifier for ECDSA-256 keys
    • ECDSA384

      public static final KeyType ECDSA384
      SSH identifier for ECDSA-384 keys
    • ECDSA521

      public static final KeyType ECDSA521
      SSH identifier for ECDSA-521 keys
    • ED25519

      public static final KeyType ED25519
    • RSA_CERT

      public static final KeyType RSA_CERT
      Signed rsa certificate
    • DSA_CERT

      public static final KeyType DSA_CERT
      Signed dsa certificate
    • ED25519_CERT

      public static final KeyType ED25519_CERT
    • ECDSA256_CERT

      public static final KeyType ECDSA256_CERT
    • ECDSA384_CERT

      public static final KeyType ECDSA384_CERT
    • ECDSA521_CERT

      public static final KeyType ECDSA521_CERT
    • UNKNOWN

      public static final KeyType UNKNOWN
      Unrecognized
  • Field Details

    • sType

      protected final String sType
  • Constructor Details

    • KeyType

      private KeyType(String type)
  • Method Details

    • values

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

      public static KeyType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • readPubKeyFromBuffer

      public abstract PublicKey readPubKeyFromBuffer(Buffer<?> buf) throws GeneralSecurityException
      Throws:
      GeneralSecurityException
    • writePubKeyContentsIntoBuffer

      protected abstract void writePubKeyContentsIntoBuffer(PublicKey pk, Buffer<?> buf)
    • putPubKeyIntoBuffer

      public void putPubKeyIntoBuffer(PublicKey pk, Buffer<?> buf)
    • isMyType

      protected abstract boolean isMyType(Key key)
    • fromKey

      public static KeyType fromKey(Key key)
    • isSubType

      private boolean isSubType(KeyType keyType)
    • getParent

      public KeyType getParent()
    • fromString

      public static KeyType fromString(String sType)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<KeyType>