Package com.unboundid.util.ssl.cert
Enum PublicKeyAlgorithmIdentifier
- java.lang.Object
-
- java.lang.Enum<PublicKeyAlgorithmIdentifier>
-
- com.unboundid.util.ssl.cert.PublicKeyAlgorithmIdentifier
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PublicKeyAlgorithmIdentifier>
@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum PublicKeyAlgorithmIdentifier extends java.lang.Enum<PublicKeyAlgorithmIdentifier>
This enum defines a set of public key algorithm names and OIDs.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DIFFIE_HELLMAN
The algorithm identifier for the Diffie-Hellman public key algorithm.DSA
The algorithm identifier for the DSA public key algorithm.EC
The algorithm identifier for the elliptic curve public key algorithm.RSA
The algorithm identifier for the RSA public key algorithm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PublicKeyAlgorithmIdentifier
forName(java.lang.String name)
Retrieves the public key algorithm identifier instance with the specified name.static PublicKeyAlgorithmIdentifier
forOID(OID oid)
Retrieves the public key algorithm identifier instance with the specified OID.java.lang.String
getName()
Retrieves the name for this public key algorithm.static java.lang.String
getNameOrOID(OID oid)
Retrieves the human-readable name for the public key 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 public key algorithm.java.lang.String
toString()
Retrieves a string representation of this public key algorithm identifier.static PublicKeyAlgorithmIdentifier
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PublicKeyAlgorithmIdentifier[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RSA
public static final PublicKeyAlgorithmIdentifier RSA
The algorithm identifier for the RSA public key algorithm. This identifier is defined in RFC 3279 section 2.3.1.
-
DSA
public static final PublicKeyAlgorithmIdentifier DSA
The algorithm identifier for the DSA public key algorithm. This identifier is defined in RFC 3279 section 2.3.2.
-
DIFFIE_HELLMAN
public static final PublicKeyAlgorithmIdentifier DIFFIE_HELLMAN
The algorithm identifier for the Diffie-Hellman public key algorithm. This identifier is defined in RFC 3279 section 2.3.3.
-
EC
public static final PublicKeyAlgorithmIdentifier EC
The algorithm identifier for the elliptic curve public key algorithm. This identifier is defined in RFC 3279 section 2.3.5.
-
-
Method Detail
-
values
public static PublicKeyAlgorithmIdentifier[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PublicKeyAlgorithmIdentifier c : PublicKeyAlgorithmIdentifier.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PublicKeyAlgorithmIdentifier valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getOID
@NotNull public OID getOID()
Retrieves the OID for this public key algorithm.- Returns:
- The OID for this public key algorithm.
-
getName
@NotNull public java.lang.String getName()
Retrieves the name for this public key algorithm.- Returns:
- The name for this public key algorithm.
-
forOID
@Nullable public static PublicKeyAlgorithmIdentifier forOID(@NotNull OID oid)
Retrieves the public key algorithm identifier instance with the specified OID.- Parameters:
oid
- The OID for the public key algorithm identifier instance to retrieve.- Returns:
- The appropriate public key algorithm identifier instance, or
null
if the provided OID does not reference a known public key algorithm identifier.
-
forName
@Nullable public static PublicKeyAlgorithmIdentifier forName(@NotNull java.lang.String name)
Retrieves the public key algorithm identifier instance with the specified name.- Parameters:
name
- The name of the public key algorithm identifier instance to retrieve.- Returns:
- The appropriate public key algorithm identifier instance, or
null
if the provided name does not reference a known public key algorithm identifier.
-
getNameOrOID
@NotNull public static java.lang.String getNameOrOID(@NotNull OID oid)
Retrieves the human-readable name for the public key 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 public key algorithm identifier to retrieve.- Returns:
- The human-readable name for the public key algorithm identifier value with the provided OID, or a string representation of the OID if there is no value with that OID.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this public key algorithm identifier.- Overrides:
toString
in classjava.lang.Enum<PublicKeyAlgorithmIdentifier>
- Returns:
- A string representation of this public key algorithm identifier.
-
-