- java.lang.Object
-
- java.lang.Enum<KeyUsageType>
-
- org.shredzone.acme4j.smime.csr.KeyUsageType
-
- All Implemented Interfaces:
Serializable
,Comparable<KeyUsageType>
public enum KeyUsageType extends Enum<KeyUsageType>
An enumeration of key usage types for S/MIME certificates.- Since:
- 2.12
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ENCRYPTION_ONLY
S/MIME certificate can be used only for encryption.SIGNING_AND_ENCRYPTION
S/MIME certificate can be used for both signing and encryption.SIGNING_ONLY
S/MIME certificate can be used only for signing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getKeyUsageBits()
Returns the key usage bits to be used in the key usage extension of a CSR.static KeyUsageType
valueOf(String name)
Returns the enum constant of this type with the specified name.static KeyUsageType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIGNING_ONLY
public static final KeyUsageType SIGNING_ONLY
S/MIME certificate can be used only for signing.
-
ENCRYPTION_ONLY
public static final KeyUsageType ENCRYPTION_ONLY
S/MIME certificate can be used only for encryption.
-
SIGNING_AND_ENCRYPTION
public static final KeyUsageType SIGNING_AND_ENCRYPTION
S/MIME certificate can be used for both signing and encryption.
-
-
Method Detail
-
values
public static KeyUsageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyUsageType c : KeyUsageType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyUsageType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getKeyUsageBits
public int getKeyUsageBits()
Returns the key usage bits to be used in the key usage extension of a CSR.
-
-