# Enum KeyExchange

java.lang.Object
java.lang.Enum<KeyExchange>
org.apache.tomcat.util.net.openssl.ciphers.KeyExchange

All Implemented Interfaces:
  `Serializable, Comparable<KeyExchange>, java.lang.constant.Constable`

public enum KeyExchange extends Enum<KeyExchange>
Key exchange algorithms supported by OpenSSL.

## Nested Class Summary

### Nested classes/interfaces inherited from class Enum

`Enum.EnumDesc<E>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`ANY`
Any key exchange (TLS 1.3).
`DHd`
DH cert, DSA CA cert (SSL_kDHd).
`DHEPSK`
DHE with pre-shared key.
`DHr`
DH cert, RSA CA cert (SSL_kDHr).
`ECDHe`
ECDH cert, ECDSA CA cert (SSL_kECDHe).
`ECDHEPSK`
ECDHE with pre-shared key.
`ECDHr`
ECDH cert, RSA CA cert (SSL_kECDHr).
`EDH`
Temporary DH key, no DH cert (SSL_kDHE).
`EECDH`
Ephemeral ECDH (SSL_kEECDH).
`FZA`
Fortezza (SSL_kFZA).
`GOST`
GOST key exchange (SSL_kGOST).
`KRB5`
Kerberos 5 key exchange (SSL_kKRB5).
`PSK`
Pre-shared key (SSK_kPSK).
`RSA`
RSA key exchange (SSL_kRSA).
`RSAPSK`
RSA with pre-shared key.
`SRP`
SRP (SSL_kSRP).

## Method Summary

Modifier and Type
Method
Description
`static KeyExchange`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static KeyExchange[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### EECDH

public static final KeyExchange EECDH
Ephemeral ECDH (SSL_kEECDH).

### RSA

public static final KeyExchange RSA
RSA key exchange (SSL_kRSA).

### DHr

public static final KeyExchange DHr
DH cert, RSA CA cert (SSL_kDHr). Not supported.

### DHd

public static final KeyExchange DHd
DH cert, DSA CA cert (SSL_kDHd). Not supported.

### EDH

public static final KeyExchange EDH
Temporary DH key, no DH cert (SSL_kDHE).

### PSK

public static final KeyExchange PSK
Pre-shared key (SSK_kPSK).

### FZA

public static final KeyExchange FZA
Fortezza (SSL_kFZA). Not supported.

### KRB5

public static final KeyExchange KRB5
Kerberos 5 key exchange (SSL_kKRB5).

### ECDHr

public static final KeyExchange ECDHr
ECDH cert, RSA CA cert (SSL_kECDHr).

### ECDHe

public static final KeyExchange ECDHe
ECDH cert, ECDSA CA cert (SSL_kECDHe).

### GOST

public static final KeyExchange GOST
GOST key exchange (SSL_kGOST).

### SRP

public static final KeyExchange SRP
SRP (SSL_kSRP).

### RSAPSK

public static final KeyExchange RSAPSK
RSA with pre-shared key.

### ECDHEPSK

public static final KeyExchange ECDHEPSK
ECDHE with pre-shared key.

### DHEPSK

public static final KeyExchange DHEPSK
DHE with pre-shared key.

### ANY

public static final KeyExchange ANY
Any key exchange (TLS 1.3).

## Method Details

### values

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