public class

X509KeyUsage

extends ASN1Encodable
java.lang.Object
   ↳ org.bouncycastle.asn1.ASN1Encodable
     ↳ org.bouncycastle.jce.X509KeyUsage

Class Overview

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) }
 

Summary

Constants
int cRLSign
int dataEncipherment
int decipherOnly
int digitalSignature
int encipherOnly
int keyAgreement
int keyCertSign
int keyEncipherment
int nonRepudiation
[Expand]
Inherited Constants
From class org.bouncycastle.asn1.ASN1Encodable
Public Constructors
X509KeyUsage(int usage)
Basic constructor.
Public Methods
DERObject toASN1Object()
[Expand]
Inherited Methods
From class org.bouncycastle.asn1.ASN1Encodable
From class java.lang.Object
From interface org.bouncycastle.asn1.DEREncodable

Constants

public static final int cRLSign

Constant Value: 2 (0x00000002)

public static final int dataEncipherment

Constant Value: 16 (0x00000010)

public static final int decipherOnly

Constant Value: 32768 (0x00008000)

public static final int digitalSignature

Constant Value: 128 (0x00000080)

public static final int encipherOnly

Constant Value: 1 (0x00000001)

public static final int keyAgreement

Constant Value: 8 (0x00000008)

public static final int keyCertSign

Constant Value: 4 (0x00000004)

public static final int keyEncipherment

Constant Value: 32 (0x00000020)

public static final int nonRepudiation

Constant Value: 64 (0x00000040)

Public Constructors

public X509KeyUsage (int usage)

Basic constructor.

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

Public Methods

public DERObject toASN1Object ()