derivation
TypeScriptget derivation(): WASharedSecret_DerivationMethodSwift declarationlet derivation: WASharedSecret.DerivationMethodThe method used to derive the shared secret on both sides of the connection, as per the Wi-Fi Aware standard.
struct · iOS 26.4+ · SDK 27.1
struct WASharedSecretA high-entropy shared secret unique to this network connection, which can be used to pair and setup security for higher layer network protocols like TLS, QUIC or IPSec without requiring manual action or data entry by a user. The shared secret can be used to authenticate a [PAKE](https://en.wikipedia.org/wiki/Password-authenticated_key_agreement) like SPAKE2, which is then used to pair and derive long-term asymmetric keys for authentication and encryption of the upper-layer network protocol. Both sides of a connection will derive the same shared secret value if the same connection and input parameters are used: - Your app and a remote app can derive the same shared secret value by calling the ``WiFiAware/WAConnection/deriveSharedSecret(for:method:context:)`` function on the same connection, with the same parameters. - Devices and accessories can derive the same value as your app by using the derivation specified in the Wi-Fi Aware 5.0 standard, and providing the same parameters as used by your app. Example Usage to get a shared secret: ```swift let secret = await connection.wifiAware?.deriveSharedSecret(for: .tlsPSK, method: .kdfHash256) ``` >Important: If needed, get a new shared secret for each new network connection. Do not save this value, send it to other devices, reuse it across connections, or use it as a long-term authentication or encryption key. Instead, use this to pair higher layer protocols, and derive unique longer-term asymmetric keys for those protocols when pairing them.
get derivation(): WASharedSecret_DerivationMethodSwift declarationlet derivation: WASharedSecret.DerivationMethodThe method used to derive the shared secret on both sides of the connection, as per the Wi-Fi Aware standard.
get data(): ArrayBufferSwift declarationlet data: DataThe secret data that is derived by both this device and the remote device for this connection.
No declarations were skipped in this snapshot.