org.mozilla.jss.pkix.crmf

Class PKIArchiveOptions

Implemented Interfaces:
ASN1Value

public class PKIArchiveOptions
extends java.lang.Object
implements ASN1Value

Nested Class Summary

static class
PKIArchiveOptions.Template
A template for decoding PKIArchiveOptions.
static class
PKIArchiveOptions.Type
A type of PKIArchiveOption.

Field Summary

static PKIArchiveOptions.Type
ARCHIVE_REM_GEN_PRIV_KEY
static PKIArchiveOptions.Type
ENCRYPTED_PRIV_KEY
static PKIArchiveOptions.Type
KEY_GEN_PARAMETERS

Constructor Summary

PKIArchiveOptions(boolean archiveRemGenPrivKey)
PKIArchiveOptions(byte[] keyGenParameters)
PKIArchiveOptions(EncryptedKey eKey)

Method Summary

void
encode(OutputStream ostream)
DER-encodes a PKIArchiveOptions.
void
encode(Tag implicitTag, OutputStream ostream)
DER-encodes a PKIArchiveOptions.
boolean
getArchiveRemGenPrivKey()
Returns the key gen parameters.
EncryptedKey
getEncryptedKey()
Returns the encrypted key.
Tag
getTag()
static PKIArchiveOptions.Template
getTemplate()
PKIArchiveOptions.Type
getType()
Returns the type of PKIArchiveOptions.

Field Details

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 Details

PKIArchiveOptions

public PKIArchiveOptions(boolean archiveRemGenPrivKey)

PKIArchiveOptions

public PKIArchiveOptions(byte[] keyGenParameters)

PKIArchiveOptions

public PKIArchiveOptions(EncryptedKey eKey)

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
DER-encodes a PKIArchiveOptions.
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   OutputStream ostream)
            throws IOException
DER-encodes a PKIArchiveOptions.
Specified by:
encode in interface ASN1Value
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()
Specified by:
getTag in interface ASN1Value

getTemplate

public static PKIArchiveOptions.Template getTemplate()

getType

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