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 class
A Template for decoding a POPOPrivKey.static class
The type of POPOPrivKey. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The SubsequentMessage field ischallengeResp
.private BIT_STRING
static final POPOPrivKey.Type
static final int
The SubsequentMessage field isencrCert
.static final POPOPrivKey.Type
private INTEGER
private static final POPOPrivKey.Template
static final POPOPrivKey.Type
private BIT_STRING
private POPOPrivKey.Type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private
POPOPrivKey
(POPOPrivKey.Type type, BIT_STRING thisMessage, INTEGER subsequentMessage, BIT_STRING dhMAC) -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(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.Template
If 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:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in 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:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
getTemplate
-