Top Description Fields Constructors Methods
org.bouncycastle.jce

public Class X509KeyUsage

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1Object, .ASN1Primitive, org.bouncycastle.asn1.x509.KeyUsage

A holding class for constructing an X509 Key Usage extension.
   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

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private int

Constructor Summary

AccessConstructor and Description
public
X509KeyUsage(int
- the bitwise OR of the Key Usage flags giving the allowed uses for the key. e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment)
usage
)

Basic constructor.

Method Summary

Modifier and TypeMethod and Description
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

cRLSignback to summary
public static final int cRLSign
dataEnciphermentback to summary
public static final int dataEncipherment
decipherOnlyback to summary
public static final int decipherOnly
digitalSignatureback to summary
public static final int digitalSignature
encipherOnlyback to summary
public static final int encipherOnly
keyAgreementback to summary
public static final int keyAgreement
keyCertSignback to summary
public static final int keyCertSign
keyEnciphermentback to summary
public static final int keyEncipherment
nonRepudiationback to summary
public static final int nonRepudiation
usageback to summary
private int usage

Constructor Detail

X509KeyUsageback to summary
public X509KeyUsage(int usage)

Basic constructor.

Parameters
usage:int

- the bitwise OR of the Key Usage flags giving the allowed uses for the key. e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment)

Method Detail

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.