One Logo Pool Ball
CryptoKit · IOS API REFERENCE

P384.Signing.PublicKey

struct · iOS 13.0+ · SDK 27.1

struct PublicKey

A P-384 public key used to verify cryptographic signatures.

Members (13)

method · iOS 13.0+

isValidSignature

TypeScript
isValidSignature(signature: P384_Signing_ECDSASignature, data: ArrayBuffer): boolean
Swift declaration
func isValidSignature<D>(_ signature: P384.Signing.ECDSASignature, for data: D) -> Bool where D : DataProtocol

Verifies an elliptic curve digital signature algorithm (ECDSA) signature on a block of data over the P-384 elliptic curve. - Parameters: - signature: The signature to verify. - data: The signed data. - Returns: A Boolean value that’s `true` if the signature is valid for the given data; otherwise, `false`.

get · iOS 14.0+

derRepresentation

TypeScript
get derRepresentation(): ArrayBuffer
Swift declaration
var derRepresentation: Data { get }

A Distinguished Encoding Rules (DER) encoded representation of the public key.

init · iOS 14.0+

init

TypeScript
static initDerRepresentation(derRepresentation: Array<number>): P384_Signing_PublicKey
Swift declaration
init<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8

Creates a P-384 public key for signing from a Distinguished Encoding Rules (DER) encoded representation. - Parameters: - derRepresentation: A DER-encoded representation of the key.

init · iOS 14.0+

init

TypeScript
static initPemRepresentation(pemRepresentation: string): P384_Signing_PublicKey
Swift declaration
init(pemRepresentation: String) throws

Creates a P-384 public key for signing from a Privacy-Enhanced Mail (PEM) representation. - Parameters: - pemRepresentation: A PEM representation of the key.

get · iOS 14.0+

pemRepresentation

TypeScript
get pemRepresentation(): string
Swift declaration
var pemRepresentation: String { get }

A Privacy-Enhanced Mail (PEM) representation of the public key.

get · iOS 13.0+

rawRepresentation

TypeScript
get rawRepresentation(): ArrayBuffer
Swift declaration
var rawRepresentation: Data { get }

A full representation of the public key.

init · iOS 13.0+

init

TypeScript
static initRawRepresentation(rawRepresentation: ArrayBuffer): P384_Signing_PublicKey
Swift declaration
init<D>(rawRepresentation: D) throws where D : ContiguousBytes

Creates a P-384 public key for signing from a collection of bytes. - Parameters: - rawRepresentation: A raw representation of the key as a collection of contiguous bytes.

get · iOS 13.0+

x963Representation

TypeScript
get x963Representation(): ArrayBuffer
Swift declaration
var x963Representation: Data { get }

An ANSI x9.63 representation of the public key.

init · iOS 13.0+

init

TypeScript
static initX963Representation(x963Representation: ArrayBuffer): P384_Signing_PublicKey
Swift declaration
init<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytes

Creates a P-384 public key for signing from an ANSI x9.63 representation. - Parameters: - x963Representation: An ANSI x9.63 representation of the key.

get · iOS 13.0+

compactRepresentation

TypeScript
get compactRepresentation(): (ArrayBuffer) | null
Swift declaration
var compactRepresentation: Data? { get }

A compact representation of the public key.

init · iOS 13.0+

init

TypeScript
static initCompactRepresentation(compactRepresentation: ArrayBuffer): P384_Signing_PublicKey
Swift declaration
init<Bytes>(compactRepresentation: Bytes) throws where Bytes : ContiguousBytes

Creates a P-384 public key for signing from a compact representation of the key. - Parameters: - compactRepresentation: A compact representation of the key as a collection of contiguous bytes.

get · iOS 16.0+

compressedRepresentation

TypeScript
get compressedRepresentation(): ArrayBuffer
Swift declaration
var compressedRepresentation: Data { get }

A compressed representation of the public key.

init · iOS 16.0+

init

TypeScript
static initCompressedRepresentation(compressedRepresentation: ArrayBuffer): P384_Signing_PublicKey
Swift declaration
init<Bytes>(compressedRepresentation: Bytes) throws where Bytes : ContiguousBytes

Creates a P-384 public key for signing from a compressed representation of the key. - Parameters: - compressedRepresentation: A compressed representation of the key as a collection of contiguous bytes.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

P384.Signing.PublicKey.isValidSignature(_:for:)

This declaration needs Swift generic type arguments. (no canonical witness for D)

All CryptoKit types →