Enum PKCS5AlgorithmIdentifier

java.lang.Object
java.lang.Enum<PKCS5AlgorithmIdentifier>
com.unboundid.util.ssl.cert.PKCS5AlgorithmIdentifier
All Implemented Interfaces:
Serializable, Comparable<PKCS5AlgorithmIdentifier>, java.lang.constant.Constable

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.
  • Enum Constant Details

    • PBES2

      public static final PKCS5AlgorithmIdentifier 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

      public static final PKCS5AlgorithmIdentifier 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

      public static final PKCS5AlgorithmIdentifier 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

      public static PKCS5AlgorithmIdentifier[] 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

      public static PKCS5AlgorithmIdentifier valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getOID

      @NotNull public OID 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 be null.
      Returns:
      The appropriate PKCS #5 algorithm identifier instance, or null if 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 be null.
      Returns:
      The appropriate PKCS #5 algorithm identifier instance, or null if the provided name does not reference a known PKCS #5 algorithm identifier.
    • getNameOrOID

      @NotNull public static String getNameOrOID(@NotNull 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.
      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

      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 be null.
      Returns:
      The name of the PBKDF2 key factory algorithm that uses the specified pseudorandom function, or null if 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 be null.
      Returns:
      The name of the cipher algorithm that should be used when creating a secret key for the specified cipher transformation, or null if the provided identifier does not represent a known cipher transformation.
    • getCipherTransformationName

      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 be null.
      Returns:
      The name of the cipher transformation that should be used when creating a cipher instance for the specified cipher transformation, or null if 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 be null.
      Returns:
      The key size, in bits, that should be used when creating a secret key for the specified cipher transformation, or null if the provided identifier does not represent a known cipher transformation.
    • toString

      Retrieves a string representation of this PKCS #5 algorithm identifier.
      Overrides:
      toString in class Enum<PKCS5AlgorithmIdentifier>
      Returns:
      A string representation of this PKCS #5 algorithm identifier.