org.mozilla.jss.pkix.crmf

Class PKIArchiveOptions

public class PKIArchiveOptions extends Object implements ASN1Value

Nested Class Summary
static classPKIArchiveOptions.Template
A template for decoding PKIArchiveOptions.
static classPKIArchiveOptions.Type
A type of PKIArchiveOption.
Field Summary
static PKIArchiveOptions.TypeARCHIVE_REM_GEN_PRIV_KEY
static PKIArchiveOptions.TypeENCRYPTED_PRIV_KEY
static PKIArchiveOptions.TypeKEY_GEN_PARAMETERS
Constructor Summary
PKIArchiveOptions(EncryptedKey eKey)
PKIArchiveOptions(byte[] keyGenParameters)
PKIArchiveOptions(boolean archiveRemGenPrivKey)
Method Summary
voidencode(OutputStream ostream)
DER-encodes a PKIArchiveOptions.
voidencode(Tag implicitTag, OutputStream ostream)
DER-encodes a PKIArchiveOptions.
booleangetArchiveRemGenPrivKey()
Returns the key gen parameters.
EncryptedKeygetEncryptedKey()
Returns the encrypted key.
TaggetTag()
static PKIArchiveOptions.TemplategetTemplate()
PKIArchiveOptions.TypegetType()
Returns the type of PKIArchiveOptions.

Field Detail

ARCHIVE_REM_GEN_PRIV_KEY

public static final PKIArchiveOptions.Type ARCHIVE_REM_GEN_PRIV_KEY

ENCRYPTED_PRIV_KEY

public static final PKIArchiveOptions.Type ENCRYPTED_PRIV_KEY

KEY_GEN_PARAMETERS

public static final PKIArchiveOptions.Type KEY_GEN_PARAMETERS

Constructor Detail

PKIArchiveOptions

public PKIArchiveOptions(EncryptedKey eKey)

PKIArchiveOptions

public PKIArchiveOptions(byte[] keyGenParameters)

PKIArchiveOptions

public PKIArchiveOptions(boolean archiveRemGenPrivKey)

Method Detail

encode

public void encode(OutputStream ostream)
DER-encodes a PKIArchiveOptions.

encode

public void encode(Tag implicitTag, OutputStream ostream)
DER-encodes a PKIArchiveOptions.

Parameters: implicitTag This parameter is ignored. A CHOICE cannot have an implicit tag.

getArchiveRemGenPrivKey

public boolean getArchiveRemGenPrivKey()
Returns the key gen parameters. Should only be called if the type is KEY_GEN_PARAMETERS. public byte[] getKeyGenParameters( ) { Assert._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 is ARCHIVE_REM_GEN_PRIV_KEY.

getEncryptedKey

public EncryptedKey getEncryptedKey()
Returns the encrypted key. Should only be called if the type is ENCRYPTED_PRIV_KEY.

getTag

public Tag getTag()

getTemplate

public static PKIArchiveOptions.Template getTemplate()

getType

public PKIArchiveOptions.Type getType()
Returns the type of PKIArchiveOptions.