Module crypt.api

Enum Class KeyStringEntry

java.lang.Object
java.lang.Enum<KeyStringEntry>
io.github.astrapi69.crypt.api.key.KeyStringEntry
All Implemented Interfaces:
Serializable, Comparable<KeyStringEntry>, Constable

public enum KeyStringEntry extends Enum<KeyStringEntry>
The enum KeyStringEntry holds prefixes for PEM value entries
  • Enum Constant Details

    • BEGIN_PRIVATE_KEY_PREFIX

      public static final KeyStringEntry BEGIN_PRIVATE_KEY_PREFIX
      The prefix for the begin of a private key
    • BEGIN_PUBLIC_KEY_PREFIX

      public static final KeyStringEntry BEGIN_PUBLIC_KEY_PREFIX
      The prefix for the begin of a public key
    • BEGIN_RSA_PRIVATE_KEY_PREFIX

      public static final KeyStringEntry BEGIN_RSA_PRIVATE_KEY_PREFIX
      The prefix for the begin of a RSA private key
    • BEGIN_RSA_PUBLIC_KEY_PREFIX

      public static final KeyStringEntry BEGIN_RSA_PUBLIC_KEY_PREFIX
      The prefix for the begin of a RSA public key
    • BEGIN_DSA_PRIVATE_KEY_PREFIX

      public static final KeyStringEntry BEGIN_DSA_PRIVATE_KEY_PREFIX
      The prefix for the begin of a DSA private key
    • BEGIN_PGP_PRIVATE_KEY_PREFIX

      public static final KeyStringEntry BEGIN_PGP_PRIVATE_KEY_PREFIX
      The prefix for the begin of a PGP private key
    • BEGIN_PGP_PUBLIC_KEY_PREFIX

      public static final KeyStringEntry BEGIN_PGP_PUBLIC_KEY_PREFIX
      The prefix for the begin of a PGP public key
    • BEGIN_EC_PRIVATE_KEY_PREFIX

      public static final KeyStringEntry BEGIN_EC_PRIVATE_KEY_PREFIX
      The prefix for the begin of a Elliptic Curve(EC) private key
    • BEGIN_PKCS7_PREFIX

      public static final KeyStringEntry BEGIN_PKCS7_PREFIX
      The prefix for the begin of a PKCS7 key
    • END_PKCS7_SUFFIX

      public static final KeyStringEntry END_PKCS7_SUFFIX
      The prefix for the begin of a PKCS7 key
    • END_PRIVATE_KEY_SUFFIX

      public static final KeyStringEntry END_PRIVATE_KEY_SUFFIX
      The suffix for the end of a private key
    • END_PUBLIC_KEY_SUFFIX

      public static final KeyStringEntry END_PUBLIC_KEY_SUFFIX
      The suffix for the end of a public key
    • END_RSA_PRIVATE_KEY_SUFFIX

      public static final KeyStringEntry END_RSA_PRIVATE_KEY_SUFFIX
      The suffix for the end of a RSA private key
    • END_RSA_PUBLIC_KEY_SUFFIX

      public static final KeyStringEntry END_RSA_PUBLIC_KEY_SUFFIX
      The suffix for the end of a RSA public key
    • END_DSA_PRIVATE_KEY_SUFFIX

      public static final KeyStringEntry END_DSA_PRIVATE_KEY_SUFFIX
      The suffix for the end of a DSA private key
    • END_PGP_PRIVATE_KEY_SUFFIX

      public static final KeyStringEntry END_PGP_PRIVATE_KEY_SUFFIX
      The suffix for the end of a PGP private key
    • END_PGP_PUBLIC_KEY_SUFFIX

      public static final KeyStringEntry END_PGP_PUBLIC_KEY_SUFFIX
      The suffix for the end of a PGP public key
    • END_EC_PRIVATE_KEY_SUFFIX

      public static final KeyStringEntry END_EC_PRIVATE_KEY_SUFFIX
      The suffix for the end of a Elliptic Curve(EC) private key
    • UNKNOWN

      public static final KeyStringEntry UNKNOWN
      The constant 'UNKNOWN' if the prefixes for PEM value entries are not known or cannot be resolved
  • Field Details

    • UNKNOWN_KEY_STRING_ENTRY

      public static final String UNKNOWN_KEY_STRING_ENTRY
      The Constant UNKNOWN_ALGORITHM_TYPE is if the algorithm type is unknown.
      See Also:
  • Method Details

    • values

      public static KeyStringEntry[] 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 KeyStringEntry 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
    • getValue

      public String getValue()
      Get the value the PEM entry
      Returns:
      the value the PEM entry
    • toString

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