Package org.mozilla.jss.pkix.crmf
Class PKIArchiveOptions
java.lang.Object
org.mozilla.jss.pkix.crmf.PKIArchiveOptions
- All Implemented Interfaces:
ASN1Value
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A template for decoding PKIArchiveOptions.static class
A type of PKIArchiveOption. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PKIArchiveOptions.Type
private boolean
static final PKIArchiveOptions.Type
private EncryptedKey
static final PKIArchiveOptions.Type
private OCTET_STRING
private Tag
private static final PKIArchiveOptions.Template
private PKIArchiveOptions.Type
-
Constructor Summary
ConstructorsConstructorDescriptionPKIArchiveOptions
(boolean archiveRemGenPrivKey) PKIArchiveOptions
(byte[] keyGenParameters) -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream ostream) DER-encodes a PKIArchiveOptions.void
encode
(Tag implicitTag, OutputStream ostream) DER-encodes a PKIArchiveOptions.boolean
Returns the key gen parameters.Returns the encrypted key.getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static PKIArchiveOptions.Template
getType()
Returns the type of PKIArchiveOptions.
-
Field Details
-
ENCRYPTED_PRIV_KEY
-
KEY_GEN_PARAMETERS
-
ARCHIVE_REM_GEN_PRIV_KEY
-
encryptedPrivKey
-
keyGenParameters
-
archiveRemGenPrivKey
private boolean archiveRemGenPrivKey -
type
-
tag
-
templateInstance
-
-
Constructor Details
-
PKIArchiveOptions
-
PKIArchiveOptions
public PKIArchiveOptions(byte[] keyGenParameters) -
PKIArchiveOptions
public PKIArchiveOptions(boolean archiveRemGenPrivKey)
-
-
Method Details
-
getType
Returns the type of PKIArchiveOptions. -
getEncryptedKey
Returns the encrypted key. Should only be called if the type isENCRYPTED_PRIV_KEY
. -
getArchiveRemGenPrivKey
public boolean getArchiveRemGenPrivKey()Returns the key gen parameters. Should only be called if the type isKEY_GEN_PARAMETERS
. public byte[] getKeyGenParameters( ) { assert(type == KEY_GEN_PARAMETERS); return keyGenParameters; } /** Returns the archiveRemGenPrivKey field, which indicates that the sender wishes the receiver to generate and archive a key pair. Should only be called if the type isARCHIVE_REM_GEN_PRIV_KEY
. -
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
DER-encodes a PKIArchiveOptions.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
DER-encodes a PKIArchiveOptions.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- This parameter is ignored. A CHOICE cannot have an implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
getTemplate
-