public class KeyUsage extends DERBitString
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) }
Modifier and Type | Field and Description |
---|---|
static int |
cRLSign |
static int |
dataEncipherment |
static int |
decipherOnly |
static int |
digitalSignature |
static int |
encipherOnly |
static int |
keyAgreement |
static int |
keyCertSign |
static int |
keyEncipherment |
static int |
nonRepudiation |
data, padBits
BER, DER
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 and Description |
---|
KeyUsage(DERBitString usage) |
KeyUsage(int usage)
Basic constructor.
|
Modifier and Type | Method and Description |
---|---|
static DERBitString |
getInstance(Object obj) |
String |
toString() |
asn1Equals, getBytes, getBytes, getInstance, getPadBits, getPadBits, getString, hashCode, intValue
equals, fromByteArray
toASN1Object
getDEREncoded, getDERObject, getEncoded, getEncoded
public static final int digitalSignature
public static final int nonRepudiation
public static final int keyEncipherment
public static final int dataEncipherment
public static final int keyAgreement
public static final int keyCertSign
public static final int cRLSign
public static final int encipherOnly
public static final int decipherOnly
public KeyUsage(int usage)
usage
- - the bitwise OR of the Key Usage flags giving the
allowed uses for the key.
e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)public KeyUsage(DERBitString usage)
public static DERBitString getInstance(Object obj)
public String toString()
toString
in class DERBitString
Copyright © 2015. All rights reserved.