ProofOfPossession (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.asn1.crmf

## Class ProofOfPossession

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.crmf.ProofOfPossession

- All Implemented Interfaces:
    ASN1Choice, ASN1Encodable, Encodable

      public class ProofOfPossession
      extends ASN1Object
      implements ASN1Choice

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `TYPE_KEY_AGREEMENT`
    `static int` | `TYPE_KEY_ENCIPHERMENT`
    `static int` | `TYPE_RA_VERIFIED`
    `static int` | `TYPE_SIGNING_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProofOfPossession()` Creates a ProofOfPossession with type raVerified.
    `ProofOfPossession(int type, POPOPrivKey privkey)` Creates a ProofOfPossession for key encipherment or agreement.
    `ProofOfPossession(POPOSigningKey poposk)` Creates a ProofOfPossession for a signing key.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ProofOfPossession` | `getInstance(java.lang.Object o)`
    `ASN1Encodable` | `getObject()`
    `int` | `getType()`
    `ASN1Primitive` | `toASN1Primitive()` ProofOfPossession ::= CHOICE { raVerified [0] NULL, -- used if the RA has already verified that the requester is in -- possession of the private key signature [1] POPOSigningKey, keyEncipherment [2] POPOPrivKey, keyAgreement [3] POPOPrivKey }

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TYPE_RA_VERIFIED

          public static final int TYPE_RA_VERIFIED

      See Also:
        Constant Field Values

    - #### TYPE_SIGNING_KEY

          public static final int TYPE_SIGNING_KEY

      See Also:
        Constant Field Values

    - #### TYPE_KEY_ENCIPHERMENT

          public static final int TYPE_KEY_ENCIPHERMENT

      See Also:
        Constant Field Values

    - #### TYPE_KEY_AGREEMENT

          public static final int TYPE_KEY_AGREEMENT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ProofOfPossession

          public ProofOfPossession()

      Creates a ProofOfPossession with type raVerified.

    - #### ProofOfPossession

          public ProofOfPossession(POPOSigningKey poposk)

      Creates a ProofOfPossession for a signing key.

    - #### ProofOfPossession

          public ProofOfPossession(int type,
                           POPOPrivKey privkey)

      Creates a ProofOfPossession for key encipherment or agreement.
      Parameters:
        `type` - one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT

  - ### Method Detail

    - #### getInstance

          public static ProofOfPossession getInstance(java.lang.Object o)

    - #### getType

          public int getType()

    - #### getObject

          public ASN1Encodable getObject()

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

           ProofOfPossession ::= CHOICE {
                                     raVerified        [0] NULL,
                                     -- used if the RA has already verified that the requester is in
                                     -- possession of the private key
                                     signature         [1] POPOSigningKey,
                                     keyEncipherment   [2] POPOPrivKey,
                                     keyAgreement      [3] POPOPrivKey }

      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a basic ASN.1 object representation.