Enum Class DirectoryStringType

java.lang.Object
java.lang.Enum<DirectoryStringType>
zeroecho.pkix.DirectoryStringType
All Implemented Interfaces:
Serializable, Comparable<DirectoryStringType>, Constable

public enum DirectoryStringType extends Enum<DirectoryStringType>
The ASN.1 string type used to encode a distinguished-name attribute value.

X.509 permits several string types for directory attribute values, and the exact choice affects the DER bytes of the name. Selecting it explicitly keeps a rebuilt name byte-for-byte identical to the intended encoding.

  • Enum Constant Details

    • UTF8

      public static final DirectoryStringType UTF8
      UTF8String — the modern default for most attributes.
    • PRINTABLE

      public static final DirectoryStringType PRINTABLE
      PrintableString — e.g. countryName, serialNumber.
    • IA5

      public static final DirectoryStringType IA5
      IA5String — e.g. legacy emailAddress.
  • Method Details

    • values

      public static DirectoryStringType[] 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 DirectoryStringType 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