PasnConfig.Builder


public static final class PasnConfig.Builder
extends Object

java.lang.Object
   ↳ android.net.wifi.rtt.PasnConfig.Builder


Builder for PasnConfig

Summary

Public constructors

Builder(int baseAkms, int ciphers)

Builder

Public methods

PasnConfig build()

Builds a PasnConfig object.

PasnConfig.Builder setPasnComebackCookie(byte[] pasnComebackCookie)

Set PASN comeback cookie.

PasnConfig.Builder setPassword(String password)

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).

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder (int baseAkms, 
                int ciphers)

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 PasnConfig.AKM_NONE, PasnConfig.AKM_PASN, PasnConfig.AKM_SAE, PasnConfig.AKM_FT_EAP_SHA256, PasnConfig.AKM_FT_PSK_SHA256, PasnConfig.AKM_FT_EAP_SHA384, PasnConfig.AKM_FT_PSK_SHA384, PasnConfig.AKM_FILS_EAP_SHA256, and 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 PasnConfig.CIPHER_NONE, PasnConfig.CIPHER_CCMP_128, PasnConfig.CIPHER_CCMP_256, PasnConfig.CIPHER_GCMP_128, and PasnConfig.CIPHER_GCMP_256

Public methods

build

public PasnConfig build ()

Builds a PasnConfig object.

Returns
PasnConfig This value cannot be null.

setPasnComebackCookie

public PasnConfig.Builder setPasnComebackCookie (byte[] pasnComebackCookie)

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 byte: an opaque sequence of octets This value cannot be null.

Returns
PasnConfig.Builder a reference to this Builder This value cannot be null.

setPassword

public PasnConfig.Builder setPassword (String password)

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.

Returns
PasnConfig.Builder a reference to this Builder This value cannot be null.

setWifiSsid

public PasnConfig.Builder setWifiSsid (WifiSsid wifiSsid)

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.

Returns
PasnConfig.Builder a reference to this Builder This value cannot be null.