@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum PKCS5AlgorithmIdentifier extends java.lang.Enum<PKCS5AlgorithmIdentifier>
Enum Constant and Description |
---|
AES_128_CBC_PAD
The algorithm identifier for the 128-bit AES/CBC/PKCS5Padding cipher
transformation.
|
AES_192_CBC_PAD
The algorithm identifier for the 192-bit AES/CBC/PKCS5Padding cipher
transformation.
|
AES_256_CBC_PAD
The algorithm identifier for the 256-bit AES/CBC/PKCS5Padding cipher
transformation.
|
DES_EDE3_CBC_PAD
The algorithm identifier for the DESede/CBC/PKCS5Padding cipher
transformation.
|
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.
|
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.
|
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.
|
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.
|
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.
|
PBES2
The algorithm identifier for the PBES2 encryption scheme.
|
PBKDF2
The algorithm identifier for the PBKDF2 key derivation function, which is
intended to be used by the PBES2 encryption scheme.
|
Modifier and Type | Method and Description |
---|---|
static PKCS5AlgorithmIdentifier |
forName(java.lang.String name)
Retrieves the PKCS #5 algorithm identifier with the specified name.
|
static PKCS5AlgorithmIdentifier |
forOID(OID oid)
Retrieves the PKCS #5 algorithm identifier with the specified OID.
|
static java.lang.String |
getCipherAlgorithmName(PKCS5AlgorithmIdentifier identifier)
Retrieves the name of the cipher algorithm that should be used when
creating a secret key for the specified cipher transformation.
|
static java.lang.Integer |
getCipherKeySizeBits(PKCS5AlgorithmIdentifier identifier)
Retrieves the key size, in bits, that should be used when creating a
secret key for the specified cipher transformation.
|
static java.lang.String |
getCipherTransformationName(PKCS5AlgorithmIdentifier identifier)
Retrieves the name of the cipher transformation that should be used when
creating a cipher instance for the specified cipher transformation.
|
static java.util.Set<PKCS5AlgorithmIdentifier> |
getCipherTransformations()
Retrieves the set of PKCS #5 algorithm identifiers that represent cipher
transformations.
|
java.lang.String |
getDescription()
Retrieves a human-readable description for the algorithm.
|
java.lang.String |
getName()
Retrieves the name for the algorithm.
|
static java.lang.String |
getNameOrOID(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.
|
OID |
getOID()
Retrieves the OID for this PKCS #5 algorithm identifier.
|
static java.lang.String |
getPBKDF2SecretKeyFactoryAlgorithmForPseudorandomFunction(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.
|
static java.util.Set<PKCS5AlgorithmIdentifier> |
getPseudorandomFunctions()
Retrieves the set of PKCS #5 algorithm identifiers that represent
pseudorandom functions.
|
java.lang.String |
toString()
Retrieves a string representation of this PKCS #5 algorithm identifier.
|
static PKCS5AlgorithmIdentifier |
valueOf(java.lang.String name)
Returns 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.
|
public static final PKCS5AlgorithmIdentifier PBES2
public static final PKCS5AlgorithmIdentifier PBKDF2
public static final PKCS5AlgorithmIdentifier HMAC_SHA_1
public static final PKCS5AlgorithmIdentifier HMAC_SHA_224
public static final PKCS5AlgorithmIdentifier HMAC_SHA_256
public static final PKCS5AlgorithmIdentifier HMAC_SHA_384
public static final PKCS5AlgorithmIdentifier HMAC_SHA_512
public static final PKCS5AlgorithmIdentifier DES_EDE3_CBC_PAD
public static final PKCS5AlgorithmIdentifier AES_128_CBC_PAD
public static final PKCS5AlgorithmIdentifier AES_192_CBC_PAD
public static final PKCS5AlgorithmIdentifier AES_256_CBC_PAD
public static PKCS5AlgorithmIdentifier[] values()
for (PKCS5AlgorithmIdentifier c : PKCS5AlgorithmIdentifier.values()) System.out.println(c);
public static PKCS5AlgorithmIdentifier valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@NotNull public OID getOID()
@NotNull public java.lang.String getName()
@NotNull public java.lang.String getDescription()
@Nullable public static PKCS5AlgorithmIdentifier forOID(@NotNull OID oid)
oid
- The OID for the PKCS #5 algorithm identifier instance to
retrieve. It must not be null
.null
if the provided OID does not reference a known PKCS
#5 algorithm identifier.@Nullable public static PKCS5AlgorithmIdentifier forName(@NotNull java.lang.String name)
name
- The name for the PKCS #5 algorithm identifier to retrieve.
It must not be null
.null
if the provided name does not reference a known PKCS
#5 algorithm identifier.@NotNull public static java.lang.String getNameOrOID(@NotNull OID oid)
oid
- The OID for the PKCS #5 algorithm identifier to retrieve.@NotNull public static java.util.Set<PKCS5AlgorithmIdentifier> getPseudorandomFunctions()
@Nullable public static java.lang.String getPBKDF2SecretKeyFactoryAlgorithmForPseudorandomFunction(@NotNull PKCS5AlgorithmIdentifier identifier)
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
.null
if the provided
identifier does not represent a known pseudorandom function.@NotNull public static java.util.Set<PKCS5AlgorithmIdentifier> getCipherTransformations()
@Nullable public static java.lang.String getCipherAlgorithmName(@NotNull PKCS5AlgorithmIdentifier identifier)
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
.null
if the provided identifier does not represent a known
cipher transformation.@Nullable public static java.lang.String getCipherTransformationName(@NotNull PKCS5AlgorithmIdentifier identifier)
identifier
- The PKCS #5 algorithm identifier that represents the
cipher transformation for which to obtain the name. It
must not be null
.null
if the provided identifier does
not represent a known cipher transformation.@Nullable public static java.lang.Integer getCipherKeySizeBits(@NotNull PKCS5AlgorithmIdentifier identifier)
identifier
- The PKCS #5 algorithm identifier that represents the
cipher transformation for which to obtain the key size.
It must not be null
.null
if
the provided identifier does not represent a known cipher
transformation.@NotNull public java.lang.String toString()
toString
in class java.lang.Enum<PKCS5AlgorithmIdentifier>