An object that uniquely identifies a particular network protocol and the pairing hanshake it uses for authentication.
Members (4)
get · iOS 26.4+
tlsPSK
TypeScript
static get tlsPSK(): WASharedSecret_ProtocolName
Swift declaration
static let tlsPSK: WASharedSecret.ProtocolName
Derive a shared secret to bootstrap TLS, using the resulting shared secret as a TLS Pre-Shared Key.
Best practices for TLS security are described in [NIST Special Publication 800-52](https://csrc.nist.gov/pubs/sp/800/52/r2/final). TLS 1.3 is recommended.
Specifying this value will use the "`TLS-PSK`" string as the protocol name when deriving the shared secret.
get · iOS 26.4+
ipsecPSK
TypeScript
static get ipsecPSK(): WASharedSecret_ProtocolName
Swift declaration
static let ipsecPSK: WASharedSecret.ProtocolName
Derive a shared secret to bootstrap IPSec, using the resulting shared secret as the IPSec Pre-Shared Key.
Best practices for IPSec security are described in [NIST Special Publication 800-77](https://csrc.nist.gov/pubs/sp/800/77/r1/final). IKEv2 and IPSec-v3 are recommended.
Specifying this value will use the "`IPSec-PSK`" string as the protocol name when deriving the shared secret.
Create a new custom protocol, providing a unique string for the context data.
Custom protocols should specify data that identifies the protocol that will use the shared secret. The exact same byte value must be set on both the local and remote devices for the same shared secret to be generated.
- Parameter data: The data to use as the underlying protocol name, which must be >= 3 bytes long.
- Returns: A new ProtocolName, or `nil` if the provided data was too short.
Create a new custom protocol name, providing a unique string for the protocol name.
Custom protocols should specify a string that identifies the protocol that will use the shared secret. The string must be representable as UTF-8, and normalize to the same value when represented as bytes. ASCII-compatible values are recommended to avoid normalization issues. The exact same value must be set on both the local and remote devices for the same shared secret to be generated.
- Parameter string: The string to use as the underlying protocol name, which must be >= 3 characters long. Will be converted to `UTF-8` prior to being hashed in the derivation.
- Returns: A new ProtocolName, or `nil` if the provided string was too short.