derRepresentation
TypeScriptget derRepresentation(): ArrayBufferSwift declarationvar derRepresentation: Data { get }A Distinguished Encoding Rules (DER) encoded representation of the public key.
struct · iOS 13.0+ · SDK 27.1
struct PublicKeyA P-256 public key used for key agreement.
get derRepresentation(): ArrayBufferSwift declarationvar derRepresentation: Data { get }A Distinguished Encoding Rules (DER) encoded representation of the public key.
static initDerRepresentation(derRepresentation: Array<number>): P256_KeyAgreement_PublicKeySwift declarationinit<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8Creates a P-256 public key for key agreement from a Distinguished Encoding Rules (DER) encoded representation. - Parameters: - derRepresentation: A DER-encoded representation of the key.
static initPemRepresentation(pemRepresentation: string): P256_KeyAgreement_PublicKeySwift declarationinit(pemRepresentation: String) throwsCreates a P-256 public key for key agreement from a Privacy-Enhanced Mail (PEM) representation. - Parameters: - pemRepresentation: A PEM representation of the key.
get pemRepresentation(): stringSwift declarationvar pemRepresentation: String { get }A Privacy-Enhanced Mail (PEM) representation of the public key.
get rawRepresentation(): ArrayBufferSwift declarationvar rawRepresentation: Data { get }A full representation of the public key.
static initRawRepresentation(rawRepresentation: ArrayBuffer): P256_KeyAgreement_PublicKeySwift declarationinit<D>(rawRepresentation: D) throws where D : ContiguousBytesCreates a P-256 public key for key agreement from a collection of bytes. - Parameters: - rawRepresentation: A raw representation of the key as a collection of contiguous bytes.
hpkeRepresentation(kem: HPKE_KEM): ArrayBufferSwift declarationfunc hpkeRepresentation(kem: HPKE.KEM) throws -> DataCreates a serialized representation of the public key. - Parameters: - kem: The Key Encapsulation Mechanism to use with the public key. - 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.
get x963Representation(): ArrayBufferSwift declarationvar x963Representation: Data { get }An ANSI x9.63 representation of the public key.
static initX963Representation(x963Representation: ArrayBuffer): P256_KeyAgreement_PublicKeySwift declarationinit<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytesCreates a P-256 public key for key agreement from an ANSI x9.63 representation. - Parameters: - x963Representation: An ANSI x9.63 representation of the key.
get compactRepresentation(): (ArrayBuffer) | nullSwift declarationvar compactRepresentation: Data? { get }A compact representation of the public key.
static initCompactRepresentation(compactRepresentation: ArrayBuffer): P256_KeyAgreement_PublicKeySwift declarationinit<Bytes>(compactRepresentation: Bytes) throws where Bytes : ContiguousBytesCreates a P-256 public key for key agreement from a compact representation of the key. - Parameters: - compactRepresentation: A compact representation of the key as a collection of contiguous bytes.
get compressedRepresentation(): ArrayBufferSwift declarationvar compressedRepresentation: Data { get }A compressed representation of the public key.
static initCompressedRepresentation(compressedRepresentation: ArrayBuffer): P256_KeyAgreement_PublicKeySwift declarationinit<Bytes>(compressedRepresentation: Bytes) throws where Bytes : ContiguousBytesCreates a P-256 public key for key agreement from a compressed representation of the key. - Parameters: - compressedRepresentation: A compressed representation of the key as a collection of contiguous bytes.
static initKem(serialization: ArrayBuffer, kem: HPKE_KEM): P256_KeyAgreement_PublicKeySwift declarationinit<D>(_ serialization: D, kem: HPKE.KEM) throws where D : ContiguousBytesCreates a NIST P-256 elliptic curve public key for use with Diffie-Hellman key exchange. - Parameters: - serialization: The serialized bytes of the public key. - kem: The key encapsulation mechanism to use with the public key. - Throws: ``CryptoKit/HPKE/Errors/inconsistentCiphersuiteAndKey`` if the key encapsulation mechanism requested is incompatible with this public key.
No declarations were skipped in this snapshot.