Enum Class NamedGroup

java.lang.Object
java.lang.Enum<NamedGroup>
io.github.mahmoudimus.quic.tls.NamedGroup
All Implemented Interfaces:
Serializable, Comparable<NamedGroup>, Constable

public enum NamedGroup extends Enum<NamedGroup>
The (EC)DHE groups the handshake offers and accepts for key exchange (RFC 8446 section 4.2.7).
  • Enum Constant Details

    • X25519

      public static final NamedGroup X25519
      X25519 (RFC 7748).
    • SECP256R1

      public static final NamedGroup SECP256R1
      NIST P-256, secp256r1.
    • SECP384R1

      public static final NamedGroup SECP384R1
      NIST P-384, secp384r1.
  • Method Details

    • values

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

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

      public int code()
      The group's TLS code point.
      Returns:
      the two-byte code, such as 0x001d for X25519
    • forCode

      public static NamedGroup forCode(int code)
      The group with a TLS code point.
      Parameters:
      code - the code point
      Returns:
      the group, or null if it is not one of these