public enum KeyUsageBits extends Enum<KeyUsageBits>
KeyUsage
BIT STRING type defined in section 4.2.1.3 of RFC
2459.Enum Constant and Description |
---|
CRLSign
cRLSign bit.
|
DataEncipherment
dataEncipherment bit.
|
DecipherOnly
decipherOnly bit.
|
DigitalSignature
digitalSignature bit.
|
EncipherOnly
encipherOnly bit.
|
KeyAgreement
keyAgreement bit.
|
KeyCertSign
keyCertSign bit.
|
KeyEncipherment
keyEncipherment bit.
|
NonRepudiation
nonRepudiation bit.
|
Modifier and Type | Method and Description |
---|---|
int |
getMask() |
boolean |
isSet(byte[] bitString)
Determines whether this key usage bit is set in the given key usage bit string.
|
boolean |
isSet(int bitString)
Determines whether this key usage bit is set in the given key usage bit string.
|
boolean |
isSet(org.bouncycastle.asn1.x509.KeyUsage keyUsage)
Determines whether this key usage bit is set in the given key usage value.
|
static int |
usage(KeyUsageBits... bits)
Computes the key usage value from one or more key usage bits.
|
static KeyUsageBits |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static KeyUsageBits[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KeyUsageBits DigitalSignature
public static final KeyUsageBits NonRepudiation
public static final KeyUsageBits KeyEncipherment
public static final KeyUsageBits DataEncipherment
public static final KeyUsageBits KeyAgreement
public static final KeyUsageBits KeyCertSign
public static final KeyUsageBits CRLSign
public static final KeyUsageBits EncipherOnly
public static final KeyUsageBits DecipherOnly
public static KeyUsageBits[] values()
for (KeyUsageBits c : KeyUsageBits.values()) System.out.println(c);
public static KeyUsageBits valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getMask()
public boolean isSet(org.bouncycastle.asn1.x509.KeyUsage keyUsage)
keyUsage
- BC key usage object.public boolean isSet(byte[] bitString)
bitString
- Key usage bit string as a byte array.public boolean isSet(int bitString)
bitString
- Key usage bit string as a big endian integer.public static int usage(KeyUsageBits... bits)
bits
- One ore more key usage bits.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.