Builder


class Builder
kotlin.Any
   ↳ android.net.wifi.rtt.PasnConfig.Builder

Builder for PasnConfig

Summary

Public constructors
Builder(baseAkms: Int, ciphers: Int)

Builder

Public methods
PasnConfig

Builds a PasnConfig object.

PasnConfig.Builder
setPasnComebackCookie(pasnComebackCookie: ByteArray)

Set PASN comeback cookie.

PasnConfig.Builder
setPassword(password: String)

Sets the password if needed by the base AKM of the PASN.

PasnConfig.Builder
setWifiSsid(wifiSsid: WifiSsid)

Sets the Wi-Fi Service Set Identifier (SSID).

Public constructors

Builder

Builder(
    baseAkms: Int,
    ciphers: Int)

Builder

Parameters
baseAkms Int: The AKMs that PASN is configured to use. PASN will use the most secure AKM in the configuration. Value is either 0 or a combination of android.net.wifi.rtt.PasnConfig#AKM_NONE, android.net.wifi.rtt.PasnConfig#AKM_PASN, android.net.wifi.rtt.PasnConfig#AKM_SAE, android.net.wifi.rtt.PasnConfig#AKM_FT_EAP_SHA256, android.net.wifi.rtt.PasnConfig#AKM_FT_PSK_SHA256, android.net.wifi.rtt.PasnConfig#AKM_FT_EAP_SHA384, android.net.wifi.rtt.PasnConfig#AKM_FT_PSK_SHA384, android.net.wifi.rtt.PasnConfig#AKM_FILS_EAP_SHA256, and android.net.wifi.rtt.PasnConfig#AKM_FILS_EAP_SHA384
ciphers Int: The CIPHERs that PASN is configured to use. PASN will use the most secure CIPHER in the configuration which is applicable to the base AKM Value is either 0 or a combination of android.net.wifi.rtt.PasnConfig#CIPHER_NONE, android.net.wifi.rtt.PasnConfig#CIPHER_CCMP_128, android.net.wifi.rtt.PasnConfig#CIPHER_CCMP_256, android.net.wifi.rtt.PasnConfig#CIPHER_GCMP_128, and android.net.wifi.rtt.PasnConfig#CIPHER_GCMP_256

Public methods

build

fun build(): PasnConfig

Builds a PasnConfig object.

Return
PasnConfig This value cannot be null.

setPasnComebackCookie

fun setPasnComebackCookie(pasnComebackCookie: ByteArray): PasnConfig.Builder

Set PASN comeback cookie. PASN authentication allows the station to provide comeback cookie which was indicated in the RangingResult by the AP with a deferral time.

When an AP receives a large volume of initial PASN Authentication frames, it can use the comeback after field in the PASN Parameters element to indicate a deferral time and optionally provide a comeback cookie which is an opaque sequence of octets. Upon receiving this response, the ranging initiator (STA) must wait for the specified time before retrying secure authentication, presenting the received cookie to the AP. See RangingResult.getPasnComebackCookie() and RangingResult.getPasnComebackAfterMillis().

Parameters
pasnComebackCookie ByteArray: an opaque sequence of octets This value cannot be null.
Return
PasnConfig.Builder a reference to this Builder This value cannot be null.

setPassword

fun setPassword(password: String): PasnConfig.Builder

Sets the password if needed by the base AKM of the PASN. If not set, password is retrieved from the saved profile identified by the SSID. See setWifiSsid(android.net.wifi.WifiSsid). Note: If password and SSID is not set, secure ranging will use unauthenticated PASN.

Parameters
password String: password string This value cannot be null.
Return
PasnConfig.Builder a reference to this Builder This value cannot be null.

setWifiSsid

fun setWifiSsid(wifiSsid: WifiSsid): PasnConfig.Builder

Sets the Wi-Fi Service Set Identifier (SSID). This is used to get the saved profile to retrieve password if password is not set using setPassword(java.lang.String). Note: If password and SSID is not set, secure ranging will use unauthenticated PASN.

Parameters
wifiSsid WifiSsid: Wi-Fi Service Set Identifier (SSID) This value cannot be null.
Return
PasnConfig.Builder a reference to this Builder This value cannot be null.