org.bouncycastle.asn1.x509
Class KeyUsage
- DEREncodable, DERString, DERTags
The KeyUsage object.
id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
KeyUsage ::= BIT STRING {
digitalSignature (0),
nonRepudiation (1),
keyEncipherment (2),
dataEncipherment (3),
keyAgreement (4),
keyCertSign (5),
cRLSign (6),
encipherOnly (7),
decipherOnly (8) }
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERALIZED_TIME, GENERAL_STRING, GRAPHIC_STRING, IA5_STRING, INTEGER, NULL, NUMERIC_STRING, OBJECT_IDENTIFIER, OCTET_STRING, PRINTABLE_STRING, SEQUENCE, SEQUENCE_OF, SET, SET_OF, T61_STRING, TAGGED, UNIVERSAL_STRING, UTC_TIME, UTF8_STRING, VIDEOTEX_STRING, VISIBLE_STRING |
cRLSign
public static final int cRLSign
- 2
dataEncipherment
public static final int dataEncipherment
- 16
decipherOnly
public static final int decipherOnly
- 32768
digitalSignature
public static final int digitalSignature
- 128
encipherOnly
public static final int encipherOnly
- 1
keyAgreement
public static final int keyAgreement
- 8
keyCertSign
public static final int keyCertSign
- 4
keyEncipherment
public static final int keyEncipherment
- 32
nonRepudiation
public static final int nonRepudiation
- 64
KeyUsage
public KeyUsage(int usage)
Basic constructor.
usage - - the bitwise OR of the Key Usage flags giving the
allowed uses for the key.
e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
toString
public String toString()