Class PassphraseEncryptedOutputStreamProperties

java.lang.Object
com.unboundid.util.PassphraseEncryptedOutputStreamProperties
All Implemented Interfaces:
Serializable

This class provides a set of properties that will be used when creating a PassphraseEncryptedOutputStream. The default settings that will be used for properties that are not required in the constructor are:
  • The header will be written to the beginning of the output stream.
  • The cipher type's key factory iteration count will be used.
  • No key identifier will be included in the encryption header.
See Also:
  • Constructor Details

  • Method Details

    • getCipherType

      Retrieves the cipher type value that will be used to obtain settings when encrypting data.
      Returns:
      The cipher type value that will be used to obtain settings when encrypting data.
    • writeHeaderToStream

      public boolean writeHeaderToStream()
      Indicates whether the PassphraseEncryptedOutputStream should write the generated PassphraseEncryptedStreamHeader to the wrapped output stream before starting the encrypted data so that a PassphraseEncryptedInputStream can read it to obtain the necessary information for decrypting the data.
      Returns:
      true if the PassphraseEncryptedOutputStream should write a PassphraseEncryptedStreamHeader to the wrapped output stream before any encrypted data, or false if not.
    • setWriteHeaderToStream

      public void setWriteHeaderToStream(boolean writeHeaderToStream)
      Specifies whether the PassphraseEncryptedOutputStream should write the generated PassphraseEncryptedStreamHeader to the wrapped output stream before starting the encrypted data so that a PassphraseEncryptedInputStream can read it to obtain the necessary information for decrypting the data. If this is false, then the necessary metadata should be stored elsewhere so that it can be used to decrypt the data.
      Parameters:
      writeHeaderToStream - Indicates whether the PassphraseEncryptedOutputStream should write the generated PassphraseEncryptedStreamHeader to the wrapped output stream before starting the encrypted data.
    • getKeyFactoryIterationCount

      Retrieves the iteration count that will be used when generating the encryption key from the passphrase.
      Returns:
      The iteration count that will be used when generating the encryption key from the passphrase.
    • setKeyFactoryIterationCount

      public void setKeyFactoryIterationCount(@Nullable Integer keyFactoryIterationCount)
      Specifies the iteration count that will be used when generating the encryption key from the passphrase.
      Parameters:
      keyFactoryIterationCount - The iteration count that will be used when generating the encryption key from the passphrase. If this is null, then the cipher type's key factory iteration count will be used.
    • getKeyIdentifier

      Retrieves a key identifier that may be used to associate the encryption details with information in another system. This is primarily intended for use in conjunction with the UnboundID/Ping Identity server products, but it may be useful in other systems as well.
      Returns:
      A key identifier that may be used to associate the encryption details with information in another system, or null if no key identifier should be used.
    • setKeyIdentifier

      public void setKeyIdentifier(@Nullable String keyIdentifier)
      Specifies a key identifier that may be used to associate the encryption details with information in another system. This is primarily intended for use in conjunction with the UnboundID/Ping Identity server products, but it may be useful in other systems as well.
      Parameters:
      keyIdentifier - A key identifier that may be used to associate the encryption details with information in another system. It may be null if no key identifier should be used.
    • toString

      Retrieves a string representation of these properties.
      Overrides:
      toString in class Object
      Returns:
      A string representation of these properties.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of these properties to the provided buffer.
      Parameters:
      buffer - The buffer to which the properties should be appended.