org.mozilla.jss.pkix.crmf

Class POPOPrivKey

public class POPOPrivKey extends 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 classPOPOPrivKey.Template
A Template for decoding a POPOPrivKey.
static classPOPOPrivKey.Type
The type of POPOPrivKey.
Field Summary
static intCHALLENGE_RESP
The SubsequentMessage field is challengeResp.
static POPOPrivKey.TypeDHMAC
static intENCR_CERT
The SubsequentMessage field is encrCert.
static POPOPrivKey.TypeSUBSEQUENT_MESSAGE
static POPOPrivKey.TypeTHIS_MESSAGE
Method Summary
static POPOPrivKeycreateDhMAC(BIT_STRING dhMAC)
Creates a new POPOPrivKey with the given dhMAC field.
static POPOPrivKeycreateSubsequentMessage(int subsequentMessage)
Creates a new POPOPrivKey with the given subsequentMessage field.
static POPOPrivKeycreateThisMessage(BIT_STRING thisMessage)
Creates a new POPOPrivKey with the given thisMessage field.
voidencode(OutputStream ostream)
voidencode(Tag implicitTag, OutputStream ostream)
Should not be called, because POPOPrivKey is a CHOICE and cannot have an implicit tag.
BIT_STRINGgetDhMAC()
If type==DHMAC, returns the dhMAC field.
INTEGERgetSubsequentMessage()
If type==SUBSEQUENT_MESSAGE, returns the subsequentMessage field.
TaggetTag()
static POPOPrivKey.TemplategetTemplate()
BIT_STRINGgetThisMessage()
If type==THIS_MESSAGE, returns the thisMessage field.
POPOPrivKey.TypegetType()
Returns the type of POPOPrivKey: THIS_MESSAGE, SUBSEQUENT_MESSAGE, or DHMAC.

Field Detail

CHALLENGE_RESP

public static final int CHALLENGE_RESP
The SubsequentMessage field is challengeResp.

DHMAC

public static final POPOPrivKey.Type DHMAC

ENCR_CERT

public static final int ENCR_CERT
The SubsequentMessage field is encrCert.

SUBSEQUENT_MESSAGE

public static final POPOPrivKey.Type SUBSEQUENT_MESSAGE

THIS_MESSAGE

public static final POPOPrivKey.Type THIS_MESSAGE

Method Detail

createDhMAC

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

createSubsequentMessage

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

createThisMessage

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

encode

public void encode(OutputStream ostream)

encode

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

getDhMAC

public BIT_STRING getDhMAC()
If type==DHMAC, returns the dhMAC 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.

getTag

public Tag getTag()

getTemplate

public static POPOPrivKey.Template getTemplate()

getThisMessage

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

getType

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