Class KeyUsage
java.lang.Object
org.gudy.bouncycastle.asn1.ASN1Encodable
org.gudy.bouncycastle.asn1.DERObject
org.gudy.bouncycastle.asn1.ASN1Object
org.gudy.bouncycastle.asn1.DERBitString
org.gudy.bouncycastle.asn1.x509.KeyUsage
- All Implemented Interfaces:
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) }
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class DERBitString
data, padBitsFields inherited from class ASN1Encodable
BER, DERFields inherited from interface DERTags
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, 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 -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class DERBitString
asn1Equals, getBytes, getBytes, getInstance, getPadBits, getPadBits, getString, hashCode, intValueMethods inherited from class ASN1Object
equals, fromByteArrayMethods inherited from class DERObject
toASN1ObjectMethods inherited from class ASN1Encodable
getDEREncoded, getDERObject, getEncoded, getEncoded
-
Field Details
-
digitalSignature
public static final int digitalSignature- See Also:
-
nonRepudiation
public static final int nonRepudiation- See Also:
-
keyEncipherment
public static final int keyEncipherment- See Also:
-
dataEncipherment
public static final int dataEncipherment- See Also:
-
keyAgreement
public static final int keyAgreement- See Also:
-
keyCertSign
public static final int keyCertSign- See Also:
-
cRLSign
public static final int cRLSign- See Also:
-
encipherOnly
public static final int encipherOnly- See Also:
-
decipherOnly
public static final int decipherOnly- See Also:
-
-
Constructor Details
-
KeyUsage
public KeyUsage(int usage) Basic constructor.- Parameters:
usage- - the bitwise OR of the Key Usage flags giving the allowed uses for the key. e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
-
KeyUsage
-
-
Method Details
-
getInstance
-
toString
- Overrides:
toStringin classDERBitString
-