One Logo Pool Ball
CryptoKit · IOS API REFERENCE

SecureEnclave.MLKEM768.PrivateKey

struct · iOS 26.0+ · SDK 27.1

struct PrivateKey

Members (6)

get · iOS 26.0+

publicKey

TypeScript
get publicKey(): MLKEM768_PublicKey
Swift declaration
let publicKey: MLKEM768.PublicKey

The corresponding public key.

method · iOS 26.0+

decapsulate

TypeScript
decapsulate(encapsulated: ArrayBuffer): SymmetricKey
Swift declaration
func decapsulate<D>(_ encapsulated: D) throws -> SymmetricKey where D : DataProtocol

Decapsulates the encapsulated shared secret - Parameter encapsulated: The encapsulated shared secret - Returns: The decapsulated shared secret

init · iOS 26.0+

init

TypeScript
static initAccessControlAuthenticationContext(accessControl?: _Security_SecAccessControl, authenticationContext?: (_LocalAuthentication_LAContext) | null): SecureEnclave_MLKEM768_PrivateKey
Swift declaration
init(accessControl: SecAccessControl = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly, [], nil)!, authenticationContext: LAContext? = nil) throws
get · iOS 26.0+

dataRepresentation

TypeScript
get dataRepresentation(): ArrayBuffer
Swift declaration
let dataRepresentation: Data

A data representation of the private key.

init · iOS 26.0+

init

TypeScript
static initDataRepresentationAuthenticationContext(dataRepresentation: ArrayBuffer, authenticationContext?: (_LocalAuthentication_LAContext) | null): SecureEnclave_MLKEM768_PrivateKey
Swift declaration
init<D>(dataRepresentation: D, authenticationContext: LAContext? = nil) throws where D : DataProtocol
static · iOS 26.0+

generate

TypeScript
static generate(): SecureEnclave_MLKEM768_PrivateKey
Swift declaration
static func generate() throws -> SecureEnclave.MLKEM768.PrivateKey

Generates a new random private key. This method implements the required interface for the KEMPrivateKey extension, in this case invoking the initializer with a default SecAccessControl and no LAContext. - Returns: The generated private key

Skipped declarations

No declarations were skipped in this snapshot.

All CryptoKit types →