All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iaik.x509.extensions.KeyUsage

java.lang.Object
   |
   +----iaik.x509.V3Extension
           |
           +----iaik.x509.extensions.KeyUsage

public class KeyUsage
extends V3Extension
This class implements the KeyUsage Extension.


Variable Index

 o cRLSign
 o dataEncipherment
 o digitalSignature
 o keyAgreement
 o keyCertSign
 o keyEncipherment
 o nonRepudiation

Constructor Index

 o KeyUsage()
Default constructor.
 o KeyUsage(int)
Construct a KeyUsage extension with a defined key usage parameter.

Method Index

 o getObjectID()
Returns the object ID of this extension
 o hashCode()
Returns a hashcode for this identity.
 o init(ASN1Object)
Inits this implementation of an extension with an ASN1Object.
 o set(int)
Sets the purpose of the key (e.g.: cRLSign | digitalSignature).
 o toASN1Object()
Returns the value of this extension as ASN1Object.
 o toString()
Returns a string that represents the contents of the extensions.

Variables

 o digitalSignature
 public static int digitalSignature
 o nonRepudiation
 public static int nonRepudiation
 o keyEncipherment
 public static int keyEncipherment
 o dataEncipherment
 public static int dataEncipherment
 o keyAgreement
 public static int keyAgreement
 o keyCertSign
 public static int keyCertSign
 o cRLSign
 public static int cRLSign

Constructors

 o KeyUsage
 public KeyUsage()
Default constructor. Creates an empty object.

 o KeyUsage
 public KeyUsage(int keyUsage)
Construct a KeyUsage extension with a defined key usage parameter.

Parameters:
keyUsage - the purpose of this key

Methods

 o getObjectID
 public ObjectID getObjectID()
Returns the object ID of this extension

Returns:
the object ID
Overrides:
getObjectID in class V3Extension
 o set
 public void set(int keyUsage)
Sets the purpose of the key (e.g.: cRLSign | digitalSignature).

Parameters:
ku - key usage bit string
 o init
 public void init(ASN1Object obj)
Inits this implementation of an extension with an ASN1Object. The ASN1Object is the extensionValue from ASN.1 type "Extension". The ASN1Object is the one created by toASN1Object().

Parameters:
obj - the extensionValue as ASN1Object
Overrides:
init in class V3Extension
See Also:
toASN1Object
 o toASN1Object
 public ASN1Object toASN1Object() throws ExtensionException
Returns the value of this extension as ASN1Object. The ASN1Object is the extensionValue from ASN.1 type "Extension". The created ASN1Object is same, which is the parameter to method init.

Returns:
the value of the extension as ASN1Object
Throws: ExtensionException
if the extension could not be created
Overrides:
toASN1Object in class V3Extension
See Also:
init
 o hashCode
 public int hashCode()
Returns a hashcode for this identity.

Returns:
a hash code for this identity
Overrides:
hashCode in class V3Extension
 o toString
 public String toString()
Returns a string that represents the contents of the extensions.

Returns:
the string representation
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index