EchConfigList
open class EchConfigList
| kotlin.Any | |
| ↳ | 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 | |
|---|---|
| open static EchConfigList |
Factory method to construct a new [EchConfigList] from a byte array. |
| open ByteArray |
toBytes()Returns the raw byte representation of an EchConfigList. |
Public methods
fromBytes
open static fun fromBytes(byteArr: ByteArray): EchConfigList
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 |
ByteArray: This value cannot be null. |
| Return | |
|---|---|
EchConfigList |
This value cannot be null. |
| Exceptions | |
|---|---|
android.net.ssl.InvalidEchDataException |
if the ECH data is empty, does not contain a length, or has a length mismatch. |
java.lang.NullPointerException |
if byteArr is null. |
toBytes
open fun toBytes(): ByteArray
Returns the raw byte representation of an EchConfigList.
| Return | |
|---|---|
ByteArray |
This value cannot be null. |