Class PKIArchiveOptions

java.lang.Object
org.mozilla.jss.pkix.crmf.PKIArchiveOptions
All Implemented Interfaces:
ASN1Value

public class PKIArchiveOptions extends Object implements ASN1Value
  • Field Details

  • Constructor Details

    • PKIArchiveOptions

      public PKIArchiveOptions(EncryptedKey eKey)
    • PKIArchiveOptions

      public PKIArchiveOptions(byte[] keyGenParameters)
    • PKIArchiveOptions

      public PKIArchiveOptions(boolean archiveRemGenPrivKey)
  • Method Details

    • getType

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

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

      public boolean getArchiveRemGenPrivKey()
      Returns the key gen parameters. Should only be called if the type is KEY_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 is ARCHIVE_REM_GEN_PRIV_KEY.
    • getTag

      public Tag 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.
      Specified by:
      getTag in interface ASN1Value
      Returns:
      Base tag.
    • encode

      public void encode(OutputStream ostream) throws IOException
      DER-encodes a PKIArchiveOptions.
      Specified by:
      encode in interface ASN1Value
      Parameters:
      ostream - Output stream.
      Throws:
      IOException - If an error occurred.
    • 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.
      ostream - Output stream.
      Throws:
      IOException - If an error occurred.
    • getTemplate

      public static PKIArchiveOptions.Template getTemplate()