Package org.mozilla.jss.pkix.crmf
Class POPOPrivKey
java.lang.Object
org.mozilla.jss.pkix.crmf.POPOPrivKey
- All Implemented Interfaces:
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
Nested ClassesModifier and TypeClassDescriptionstatic classA Template for decoding a POPOPrivKey.static classThe type of POPOPrivKey. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe SubsequentMessage field ischallengeResp.private BIT_STRINGstatic final POPOPrivKey.Typestatic final intThe SubsequentMessage field isencrCert.static final POPOPrivKey.Typeprivate INTEGERprivate static final POPOPrivKey.Templatestatic final POPOPrivKey.Typeprivate BIT_STRINGprivate POPOPrivKey.Type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprivatePOPOPrivKey(POPOPrivKey.Type type, BIT_STRING thisMessage, INTEGER subsequentMessage, BIT_STRING dhMAC) -
Method Summary
Modifier and TypeMethodDescriptionstatic 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) Write this value's DER encoding to an output stream using its own base tag.voidencode(Tag implicitTag, OutputStream ostream) Should not be called, because POPOPrivKey is a CHOICE and cannot have an implicit tag.getDhMAC()If type==DHMAC, returns the dhMAC field.If type==SUBSEQUENT_MESSAGE, returns the subsequentMessage field.getTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static POPOPrivKey.TemplateIf type==THIS_MESSAGE, returns the thisMessage field.getType()Returns the type of POPOPrivKey: THIS_MESSAGE, SUBSEQUENT_MESSAGE, or DHMAC.
-
Field Details
-
THIS_MESSAGE
-
SUBSEQUENT_MESSAGE
-
DHMAC
-
ENCR_CERT
public static final int ENCR_CERTThe SubsequentMessage field isencrCert.- See Also:
-
CHALLENGE_RESP
public static final int CHALLENGE_RESPThe SubsequentMessage field ischallengeResp.- See Also:
-
type
-
thisMessage
-
subsequentMessage
-
dhMAC
-
templateInstance
-
-
Constructor Details
-
POPOPrivKey
private POPOPrivKey() -
POPOPrivKey
private POPOPrivKey(POPOPrivKey.Type type, BIT_STRING thisMessage, INTEGER subsequentMessage, BIT_STRING dhMAC)
-
-
Method Details
-
getType
Returns the type of POPOPrivKey: THIS_MESSAGE, SUBSEQUENT_MESSAGE, or DHMAC. -
getThisMessage
If type==THIS_MESSAGE, returns the thisMessage field. Otherwise, returns null. -
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
If type==DHMAC, returns the dhMAC field. Otherwise, returns null. -
createThisMessage
Creates a new POPOPrivKey with the given thisMessage field. -
createSubsequentMessage
Creates a new POPOPrivKey with the given subsequentMessage field. -
createDhMAC
Creates a new POPOPrivKey with the given dhMAC field. -
getTag
Description copied from interface:ASN1ValueReturns the base tag for this type, not counting any tags that may be imposed on it by its context. -
encode
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using its own base tag.- Specified by:
encodein interfaceASN1Value- Parameters:
ostream- Output stream.- Throws:
IOException- If an error occurred.
-
encode
Should not be called, because POPOPrivKey is a CHOICE and cannot have an implicit tag.- Specified by:
encodein interfaceASN1Value- Parameters:
implicitTag- Implicit tag.ostream- Output stream.- Throws:
IOException- If an error occurred.
-
getTemplate
-