You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.




org.mozilla.jss.pkix.crmf
Class POPOPrivKey

java.lang.Object
  extended by org.mozilla.jss.pkix.crmf.POPOPrivKey
All Implemented Interfaces:
ASN1Value

public class POPOPrivKey
extends java.lang.Object
implements ASN1Value

CRMF POPOPrivKey:

 POPOPrivKey ::= CHOICE {
      thisMessage         [0] BIT STRING,
      subsequentMessage   [1] SubsequentMessage,
      dhMAC               [2] BIT STRING }

 SubsequentMessage ::= INTEGER {
      encrCert        (0),
      challengeResp   (1) }
 


Nested Class Summary
static class POPOPrivKey.Template
          A Template for decoding a POPOPrivKey.
static class POPOPrivKey.Type
          The type of POPOPrivKey.
 
Field Summary
static int CHALLENGE_RESP
          The SubsequentMessage field is challengeResp.
static POPOPrivKey.Type DHMAC
           
static int ENCR_CERT
          The SubsequentMessage field is encrCert.
static POPOPrivKey.Type SUBSEQUENT_MESSAGE
           
static POPOPrivKey.Type THIS_MESSAGE
           
 
Method Summary
static POPOPrivKey createDhMAC(BIT_STRING dhMAC)
          Creates a new POPOPrivKey with the given dhMAC field.
static POPOPrivKey createSubsequentMessage(int subsequentMessage)
          Creates a new POPOPrivKey with the given subsequentMessage field.
static POPOPrivKey createThisMessage(BIT_STRING thisMessage)
          Creates a new POPOPrivKey with the given thisMessage field.
 void encode(java.io.OutputStream ostream)
          Write this value's DER encoding to an output stream using its own base tag.
 void encode(Tag implicitTag, java.io.OutputStream ostream)
          Should not be called, because POPOPrivKey is a CHOICE and cannot have an implicit tag.
 BIT_STRING getDhMAC()
          If type==DHMAC, returns the dhMAC field.
 INTEGER getSubsequentMessage()
          If type==SUBSEQUENT_MESSAGE, returns the subsequentMessage field.
 Tag getTag()
          Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
static POPOPrivKey.Template getTemplate()
           
 BIT_STRING getThisMessage()
          If type==THIS_MESSAGE, returns the thisMessage field.
 POPOPrivKey.Type getType()
          Returns the type of POPOPrivKey: THIS_MESSAGE, SUBSEQUENT_MESSAGE, or DHMAC.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THIS_MESSAGE

public static final POPOPrivKey.Type THIS_MESSAGE

SUBSEQUENT_MESSAGE

public static final POPOPrivKey.Type SUBSEQUENT_MESSAGE

DHMAC

public static final POPOPrivKey.Type DHMAC

ENCR_CERT

public static final int ENCR_CERT
The SubsequentMessage field is encrCert.

See Also:
Constant Field Values

CHALLENGE_RESP

public static final int CHALLENGE_RESP
The SubsequentMessage field is challengeResp.

See Also:
Constant Field Values
Method Detail

getType

public POPOPrivKey.Type getType()
Returns the type of POPOPrivKey: THIS_MESSAGE, SUBSEQUENT_MESSAGE, or DHMAC.


getThisMessage

public BIT_STRING getThisMessage()
If type==THIS_MESSAGE, returns the thisMessage field. Otherwise, returns null.


getSubsequentMessage

public INTEGER getSubsequentMessage()
If type==SUBSEQUENT_MESSAGE, returns the subsequentMessage field. Otherwise, returns null. The return value can be converted to an integer and compared with ENCR_CERT and CHALLENGE_RESP.


getDhMAC

public BIT_STRING getDhMAC()
If type==DHMAC, returns the dhMAC field. Otherwise, returns null.


createThisMessage

public static POPOPrivKey createThisMessage(BIT_STRING thisMessage)
Creates a new POPOPrivKey with the given thisMessage field.


createSubsequentMessage

public static POPOPrivKey createSubsequentMessage(int subsequentMessage)
Creates a new POPOPrivKey with the given subsequentMessage field.


createDhMAC

public static POPOPrivKey createDhMAC(BIT_STRING dhMAC)
Creates a new POPOPrivKey with the given dhMAC field.


getTag

public Tag getTag()
Description copied from interface: ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.

Specified by:
getTag in interface ASN1Value

encode

public void encode(java.io.OutputStream ostream)
            throws java.io.IOException
Description copied from interface: ASN1Value
Write this value's DER encoding to an output stream using its own base tag.

Specified by:
encode in interface ASN1Value
Throws:
java.io.IOException

encode

public void encode(Tag implicitTag,
                   java.io.OutputStream ostream)
            throws java.io.IOException
Should not be called, because POPOPrivKey is a CHOICE and cannot have an implicit tag.

Specified by:
encode in interface ASN1Value
Throws:
java.io.IOException

getTemplate

public static POPOPrivKey.Template getTemplate()