Package io.github.mahmoudimus.quic.tls
Enum Class NamedGroup
- All Implemented Interfaces:
Serializable,Comparable<NamedGroup>,Constable
The (EC)DHE groups the handshake offers and accepts for key exchange (RFC 8446 section 4.2.7).
-
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 TypeMethodDescriptionintcode()The group's TLS code point.static NamedGroupforCode(int code) The group with a TLS code point.static NamedGroupReturns the enum constant of this class with the specified name.static NamedGroup[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
X25519
X25519 (RFC 7748). -
SECP256R1
NIST P-256,secp256r1. -
SECP384R1
NIST P-384,secp384r1.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
code
public int code()The group's TLS code point.- Returns:
- the two-byte code, such as
0x001dfor X25519
-
forCode
The group with a TLS code point.- Parameters:
code- the code point- Returns:
- the group, or null if it is not one of these
-