Class KeyUsage

All Implemented Interfaces:
DEREncodable, DERString, DERTags

public class KeyUsage extends DERBitString
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 Details

  • 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

      public KeyUsage(DERBitString usage)
  • Method Details