Enum Class KeyUsage
- All Implemented Interfaces:
Serializable, Comparable<KeyUsage>, Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioncRLSign (bit 6).dataEncipherment (bit 3).decipherOnly (bit 8).digitalSignature (bit 0).encipherOnly (bit 7).keyAgreement (bit 4).keyCertSign (bit 5).keyEncipherment (bit 2).nonRepudiation / contentCommitment (bit 1). -
Method Summary
Modifier and TypeMethodDescriptionintbit()Returns the DER bit position of this usage (equal to the ordinal).static KeyUsageReturns the enum constant of this class with the specified name.static KeyUsage[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIGITAL_SIGNATURE
digitalSignature (bit 0). -
NON_REPUDIATION
nonRepudiation / contentCommitment (bit 1). -
KEY_ENCIPHERMENT
keyEncipherment (bit 2). -
DATA_ENCIPHERMENT
dataEncipherment (bit 3). -
KEY_AGREEMENT
keyAgreement (bit 4). -
KEY_CERT_SIGN
keyCertSign (bit 5). -
CRL_SIGN
cRLSign (bit 6). -
ENCIPHER_ONLY
encipherOnly (bit 7). -
DECIPHER_ONLY
decipherOnly (bit 8).
-
-
Method Details
-
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
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 nameNullPointerException- 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
-