Enum Class KeyUsage

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

public enum KeyUsage extends Enum<KeyUsage>
The X.509 KeyUsage bits (RFC 5280, 4.2.1.3), in the standard bit order.

This enum is the typed, JCA-friendly counterpart of the boolean-array key-usage representation returned by X509Certificate.getKeyUsage(): the ordinal of each constant equals its DER bit position.

  • Enum Constant Details

    • DIGITAL_SIGNATURE

      public static final KeyUsage DIGITAL_SIGNATURE
      digitalSignature (bit 0).
    • NON_REPUDIATION

      public static final KeyUsage NON_REPUDIATION
      nonRepudiation / contentCommitment (bit 1).
    • KEY_ENCIPHERMENT

      public static final KeyUsage KEY_ENCIPHERMENT
      keyEncipherment (bit 2).
    • DATA_ENCIPHERMENT

      public static final KeyUsage DATA_ENCIPHERMENT
      dataEncipherment (bit 3).
    • KEY_AGREEMENT

      public static final KeyUsage KEY_AGREEMENT
      keyAgreement (bit 4).
    • KEY_CERT_SIGN

      public static final KeyUsage KEY_CERT_SIGN
      keyCertSign (bit 5).
    • CRL_SIGN

      public static final KeyUsage CRL_SIGN
      cRLSign (bit 6).
    • ENCIPHER_ONLY

      public static final KeyUsage ENCIPHER_ONLY
      encipherOnly (bit 7).
    • DECIPHER_ONLY

      public static final KeyUsage DECIPHER_ONLY
      decipherOnly (bit 8).
  • Method Details

    • values

      public static KeyUsage[] 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 KeyUsage 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
    • bit

      public int bit()
      Returns the DER bit position of this usage (equal to the ordinal).
      Returns:
      the standard bit position