Package com.unboundid.util
Enum PassphraseEncryptionCipherType
- All Implemented Interfaces:
Serializable,Comparable<PassphraseEncryptionCipherType>,java.lang.constant.Constable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public enum PassphraseEncryptionCipherType
extends Enum<PassphraseEncryptionCipherType>
This enum defines sets of settings that may be used when encrypting data with
a
PassphraseEncryptedOutputStream.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the cipher type value for the provided name.Retrieves the cipher transformation that will be used for the encryption.intRetrieves the length (in bytes) to use for the initialization vector when generating the cipher.Retrieves the name of the algorithm that will be used to generate the encryption key from the passphrase.intRetrieves the iteration count that will be used when generating the encryption key from the passphrase.intRetrieves the length (in bytes) to use for the salt when generating the encryption key from the passphrase.intRetrieves the length (in bits) for the encryption key to generate.Retrieves the name of the algorithm that will be used to generate a MAC of the encryption header contents.Retrieves the cipher type value that corresponds to the strongest supported level of protection that is available in the underlying JVM.toString()Retrieves a string representation of this cipher type value.voidtoString(StringBuilder buffer) Appends a string representation of this cipher type value to the provided buffer.Returns the enum constant of this type with the specified name.static PassphraseEncryptionCipherType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AES_128
Cipher settings that use a 128-bit AES cipher. -
AES_256
Cipher settings that use a 256-bit AES cipher.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getCipherTransformation
Retrieves the cipher transformation that will be used for the encryption.- Returns:
- The cipher transformation that will be used for the encryption.
-
getKeyLengthBits
Retrieves the length (in bits) for the encryption key to generate.- Returns:
- The length (in bits) for the encryption key to generate.
-
getKeyFactoryAlgorithm
Retrieves the name of the algorithm that will be used to generate the encryption key from the passphrase.- Returns:
- The name of the algorithm that will be used to generate the encryption key from the passphrase.
-
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.
-
getKeyFactorySaltLengthBytes
Retrieves the length (in bytes) to use for the salt when generating the encryption key from the passphrase.- Returns:
- The length (in bytes) to use for the salt when generating the encryption key from the passphrase.
-
getInitializationVectorLengthBytes
Retrieves the length (in bytes) to use for the initialization vector when generating the cipher.- Returns:
- The length (in bytes) to use for the initialization vector when generating the cipher.
-
getMacAlgorithm
Retrieves the name of the algorithm that will be used to generate a MAC of the encryption header contents.- Returns:
- The name of the algorithm that will be used to generate a MAC of the encryption header contents.
-
forName
Retrieves the cipher type value for the provided name.- Parameters:
name- The name of the cipher type value to retrieve.- Returns:
- The cipher type object for the given name, or
nullif the provided name does not map to any cipher type value.
-
getStrongestAvailableCipherType
Retrieves the cipher type value that corresponds to the strongest supported level of protection that is available in the underlying JVM.- Returns:
- The cipher type value that corresponds to the strongest supported level of protection in the underlying JVM.
-
toString
Retrieves a string representation of this cipher type value.- Overrides:
toStringin classEnum<PassphraseEncryptionCipherType>- Returns:
- A string representation of this cipher type value.
-
toString
Appends a string representation of this cipher type value to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended.
-