Structure
SharedSecret
A key agreement result from which you can derive a symmetric cryptographic key.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
struct SharedSecret
Mentioned In
Overview
Generate a shared secret by calling sharedSecretFromKeyAgreement(with:format:) on a private key with the public key from another party, then access the raw serialized EC point via withUnsafeBytes(_:). The byte layout follows the requested P256K.KeyAgreement format — 33 bytes when compressed, 65 bytes when uncompressed.
Topics
Operators
Instance Methods