Package com.unboundid.util.ssl.cert
Enum PKCS5AlgorithmIdentifier
- All Implemented Interfaces:
Serializable,Comparable<PKCS5AlgorithmIdentifier>,java.lang.constant.Constable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public enum PKCS5AlgorithmIdentifier
extends Enum<PKCS5AlgorithmIdentifier>
This enum defines a set of OIDs and algorithm names for password-based
cryptography as described in the PKCS #5 specification defined in RFC 8018.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe algorithm identifier for the 128-bit AES/CBC/PKCS5Padding cipher transformation.The algorithm identifier for the 192-bit AES/CBC/PKCS5Padding cipher transformation.The algorithm identifier for the 256-bit AES/CBC/PKCS5Padding cipher transformation.The algorithm identifier for the DESede/CBC/PKCS5Padding cipher transformation.The algorithm identifier for the HMAC-SHA-1 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function.The algorithm identifier for the HMAC-SHA-224 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function.The algorithm identifier for the HMAC-SHA-256 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function.The algorithm identifier for the HMAC-SHA-384 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function.The algorithm identifier for the HMAC-SHA-512 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function.The algorithm identifier for the PBES2 encryption scheme.The algorithm identifier for the PBKDF2 key derivation function, which is intended to be used by the PBES2 encryption scheme. -
Method Summary
Modifier and TypeMethodDescriptionstatic PKCS5AlgorithmIdentifierRetrieves the PKCS #5 algorithm identifier with the specified name.static PKCS5AlgorithmIdentifierRetrieves the PKCS #5 algorithm identifier with the specified OID.static StringgetCipherAlgorithmName(PKCS5AlgorithmIdentifier identifier) Retrieves the name of the cipher algorithm that should be used when creating a secret key for the specified cipher transformation.static IntegergetCipherKeySizeBits(PKCS5AlgorithmIdentifier identifier) Retrieves the key size, in bits, that should be used when creating a secret key for the specified cipher transformation.static StringgetCipherTransformationName(PKCS5AlgorithmIdentifier identifier) Retrieves the name of the cipher transformation that should be used when creating a cipher instance for the specified cipher transformation.static Set<PKCS5AlgorithmIdentifier> Retrieves the set of PKCS #5 algorithm identifiers that represent cipher transformations.Retrieves a human-readable description for the algorithm.getName()Retrieves the name for the algorithm.static StringgetNameOrOID(OID oid) Retrieves the human-readable name for the PKCS #5 algorithm identifier value with the provided OID, or a string representation of the OID if there is no value with that OID.getOID()Retrieves the OID for this PKCS #5 algorithm identifier.static StringRetrieves the name of the secret key factory algorithm that should be used to create a PBKDF2 key factory that uses the specified pseudorandom function.static Set<PKCS5AlgorithmIdentifier> Retrieves the set of PKCS #5 algorithm identifiers that represent pseudorandom functions.toString()Retrieves a string representation of this PKCS #5 algorithm identifier.static PKCS5AlgorithmIdentifierReturns the enum constant of this type with the specified name.static PKCS5AlgorithmIdentifier[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PBES2
The algorithm identifier for the PBES2 encryption scheme. This scheme is defined in RFC 8018 section 6.2, and the identifier is defined in appendix A.4 of that specification. -
PBKDF2
The algorithm identifier for the PBKDF2 key derivation function, which is intended to be used by the PBES2 encryption scheme. This identifier is described in RFC 8018 appendix A.2. -
HMAC_SHA_1
The algorithm identifier for the HMAC-SHA-1 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function. This identifier is described in RFC 8018 appendix B.1.1. -
HMAC_SHA_224
The algorithm identifier for the HMAC-SHA-224 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function. This identifier is described in RFC 8018 appendix B.1.2. -
HMAC_SHA_256
The algorithm identifier for the HMAC-SHA-256 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function. This identifier is described in RFC 8018 appendix B.1.2. -
HMAC_SHA_384
The algorithm identifier for the HMAC-SHA-384 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function. This identifier is described in RFC 8018 appendix B.1.2. -
HMAC_SHA_512
The algorithm identifier for the HMAC-SHA-512 pseudorandom function, which may be used in conjunction with the PBKDF2 key derivation function. This identifier is described in RFC 8018 appendix B.1.2. -
DES_EDE3_CBC_PAD
The algorithm identifier for the DESede/CBC/PKCS5Padding cipher transformation. This identifier is described in RFC 8018 appendix B.2.2. -
AES_128_CBC_PAD
The algorithm identifier for the 128-bit AES/CBC/PKCS5Padding cipher transformation. This identifier is described in RFC 8018 appendix B.2.2. -
AES_192_CBC_PAD
The algorithm identifier for the 192-bit AES/CBC/PKCS5Padding cipher transformation. This identifier is described in RFC 8018 appendix C. -
AES_256_CBC_PAD
The algorithm identifier for the 256-bit AES/CBC/PKCS5Padding cipher transformation. This identifier is described in RFC 8018 appendix C.
-
-
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
-
getOID
Retrieves the OID for this PKCS #5 algorithm identifier.- Returns:
- The OID for this PKCS #5 algorithm identifier.
-
getName
Retrieves the name for the algorithm.- Returns:
- The name for the algorithm.
-
getDescription
Retrieves a human-readable description for the algorithm.- Returns:
- A human-readable description for the algorithm.
-
forOID
Retrieves the PKCS #5 algorithm identifier with the specified OID.- Parameters:
oid- The OID for the PKCS #5 algorithm identifier instance to retrieve. It must not benull.- Returns:
- The appropriate PKCS #5 algorithm identifier instance, or
nullif the provided OID does not reference a known PKCS #5 algorithm identifier.
-
forName
Retrieves the PKCS #5 algorithm identifier with the specified name.- Parameters:
name- The name for the PKCS #5 algorithm identifier to retrieve. It must not benull.- Returns:
- The appropriate PKCS #5 algorithm identifier instance, or
nullif the provided name does not reference a known PKCS #5 algorithm identifier.
-
getNameOrOID
Retrieves the human-readable name for the PKCS #5 algorithm identifier value with the provided OID, or a string representation of the OID if there is no value with that OID.- Parameters:
oid- The OID for the PKCS #5 algorithm identifier to retrieve.- Returns:
- The human-readable name for the PKCS #5 algorithm identifier value with the provided OID, or a string representation of the OID if there is no value with that OID.
-
getPseudorandomFunctions
Retrieves the set of PKCS #5 algorithm identifiers that represent pseudorandom functions.- Returns:
- The set of PKCS #5 algorithm identifiers that represent pseudorandom functions.
-
getPBKDF2SecretKeyFactoryAlgorithmForPseudorandomFunction
@Nullable public static String getPBKDF2SecretKeyFactoryAlgorithmForPseudorandomFunction(@NotNull PKCS5AlgorithmIdentifier identifier) Retrieves the name of the secret key factory algorithm that should be used to create a PBKDF2 key factory that uses the specified pseudorandom function.- Parameters:
identifier- The PKCS #5 algorithm identifier that represents the pseudorandom function for which to obtain the name of the corresponding PBKDF2 secret key factory algorithm. It must not benull.- Returns:
- The name of the PBKDF2 key factory algorithm that uses the
specified pseudorandom function, or
nullif the provided identifier does not represent a known pseudorandom function.
-
getCipherTransformations
Retrieves the set of PKCS #5 algorithm identifiers that represent cipher transformations.- Returns:
- The set of PKCS #5 algorithm identifiers that represent cipher transformations.
-
getCipherAlgorithmName
Retrieves the name of the cipher algorithm that should be used when creating a secret key for the specified cipher transformation.- Parameters:
identifier- The PKCS #5 algorithm identifier that represents the cipher transformation for which to obtain the name of the corresponding cipher algorithm. It must not benull.- Returns:
- The name of the cipher algorithm that should be used when creating
a secret key for the specified cipher transformation, or
nullif the provided identifier does not represent a known cipher transformation.
-
getCipherTransformationName
@Nullable public static String getCipherTransformationName(@NotNull PKCS5AlgorithmIdentifier identifier) Retrieves the name of the cipher transformation that should be used when creating a cipher instance for the specified cipher transformation.- Parameters:
identifier- The PKCS #5 algorithm identifier that represents the cipher transformation for which to obtain the name. It must not benull.- Returns:
- The name of the cipher transformation that should be used when
creating a cipher instance for the specified cipher
transformation, or
nullif the provided identifier does not represent a known cipher transformation.
-
getCipherKeySizeBits
Retrieves the key size, in bits, that should be used when creating a secret key for the specified cipher transformation.- Parameters:
identifier- The PKCS #5 algorithm identifier that represents the cipher transformation for which to obtain the key size. It must not benull.- Returns:
- The key size, in bits, that should be used when creating a secret
key for the specified cipher transformation, or
nullif the provided identifier does not represent a known cipher transformation.
-
toString
Retrieves a string representation of this PKCS #5 algorithm identifier.- Overrides:
toStringin classEnum<PKCS5AlgorithmIdentifier>- Returns:
- A string representation of this PKCS #5 algorithm identifier.
-