hpkeRepresentation(kem:)

Creates a serialized representation of the public key.

HPKE-NIST-EC-KEMs.swift:114
iOS
13+
macOS
10.15+
tvOS
13+
watchOS
6+
func hpkeRepresentation(kem: HPKE.KEM) throws -> Data

Returns

The serialized representation of the public key.

Throws

CryptoKit/HPKE/Errors/inconsistentCiphersuiteAndKey if the key encapsulation mechanism requested is incompatible with this public key.

  • kem: The Key Encapsulation Mechanism to use with the public key.