EchConfigList
public
class
EchConfigList
extends Object
| java.lang.Object | |
| ↳ | android.net.ssl.EchConfigList |
Data used to configure ECH (Encrypted Client Hello) in a TLS handshake.
This object can only be constructed by feeding in the raw bytes of the EchConfigList from a HTTPS DNS record (see https://datatracker.ietf.org/doc/html/rfc460), and may contain multiple EchConfigs.
The general structure starts with the length of the EchConfigList (2 bytes), then each entry in the list contains the following:
- Version: 2 bytes
- Length of the individual EchConfig: 2 bytes
- Contents: unspecified number of bytes
See https://datatracker.ietf.org/doc/draft-ietf-tls-esni for details of the exact structure.
Summary
Public methods | |
|---|---|
static
EchConfigList
|
fromBytes(byte[] byteArr)
Factory method to construct a new [EchConfigList] from a byte array. |
byte[]
|
toBytes()
Returns the raw byte representation of an EchConfigList. |
Inherited methods | |
|---|---|
Public methods
fromBytes
public static EchConfigList fromBytes (byte[] byteArr)
Factory method to construct a new [EchConfigList] from a byte array.
The raw bytes from a HTTPS DNS record should be fed directly into this method.
| Parameters | |
|---|---|
byteArr |
byte: This value cannot be null. |
| Returns | |
|---|---|
EchConfigList |
This value cannot be null. |
| Throws | |
|---|---|
InvalidEchDataException |
if the ECH data is empty, does not contain a length, or has a length mismatch. |
NullPointerException |
if byteArr is null. |
toBytes
public byte[] toBytes ()
Returns the raw byte representation of an EchConfigList.
| Returns | |
|---|---|
byte[] |
This value cannot be null. |