iOS reference / CryptoKit / MLKEM768.PublicKeyCryptoKit · IOS API REFERENCE
MLKEM768.PublicKey struct · iOS 26.0+ · SDK 27.1
struct PublicKeyA public key you use to encapsulate shared secrets with the Module-Lattice key encapsulation mechanism.
Members (3) method · iOS 26.0+ encapsulate TypeScript encapsulate(): KEM_EncapsulationResultSwift declaration func encapsulate() throws -> KEM.EncapsulationResultGenerates and encapsulates a shared secret.
- Returns: an encapsulated shared secret, that you decapsulate by calling ``MLKEM768/PrivateKey/decapsulate(_:)`` on the corresponding private key.
get · iOS 26.0+ rawRepresentation TypeScript get rawRepresentation(): ArrayBufferSwift declaration var rawRepresentation: Data { get }A serialized representation of the public key.
init · iOS 26.0+ init TypeScript static init(rawRepresentation: ArrayBuffer): MLKEM768_PublicKeySwift declaration init<D>(rawRepresentation: D) throws where D : DataProtocolInitializes a public key from a raw representation.
- Parameter rawRepresentation: Data that represents the public key.
Skipped declarations No declarations were skipped in this snapshot.
All CryptoKit types →