publicKey
TypeScriptget publicKey(): P521_Signing_PublicKeySwift declarationvar publicKey: P521.Signing.PublicKey { get }The corresponding public key.
struct · iOS 13.0+ · SDK 27.1
struct PrivateKeyA P-521 private key used to create cryptographic signatures.
get publicKey(): P521_Signing_PublicKeySwift declarationvar publicKey: P521.Signing.PublicKey { get }The corresponding public key.
get derRepresentation(): ArrayBufferSwift declarationvar derRepresentation: Data { get }A Distinguished Encoding Rules (DER) encoded representation of the private key.
static initDerRepresentation(derRepresentation: Array<number>): P521_Signing_PrivateKeySwift declarationinit<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8Creates a P-521 private key for signing from a Distinguished Encoding Rules (DER) encoded representation. - Parameters: - derRepresentation: A DER-encoded representation of the key.
static initPemRepresentation(pemRepresentation: string): P521_Signing_PrivateKeySwift declarationinit(pemRepresentation: String) throwsCreates a P-521 private key for signing 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 private key.
get rawRepresentation(): ArrayBufferSwift declarationvar rawRepresentation: Data { get }A data representation of the private key.
static initRawRepresentation(rawRepresentation: ArrayBuffer): P521_Signing_PrivateKeySwift declarationinit<Bytes>(rawRepresentation: Bytes) throws where Bytes : ContiguousBytesCreates a P-521 private key for signing from a collection of bytes. - Parameters: - rawRepresentation: A raw representation of the key as a collection of contiguous bytes.
get x963Representation(): ArrayBufferSwift declarationvar x963Representation: Data { get }An ANSI x9.63 representation of the private key.
static initX963Representation(x963Representation: ArrayBuffer): P521_Signing_PrivateKeySwift declarationinit<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytesCreates a P-521 private key for signing from an ANSI x9.63 representation. - Parameters: - x963Representation: An ANSI x9.63 representation of the key.
static initCompactRepresentable(compactRepresentable?: boolean): P521_Signing_PrivateKeySwift declarationinit(compactRepresentable: Bool = true)Creates a random P-521 private key for signing. Keys that use a compact point encoding enable shorter public keys, but aren’t compliant with FIPS certification. If your app requires FIPS certification, create a key with ``init(rawRepresentation:)``. - Parameters: - compactRepresentable: A Boolean value that indicates whether CryptoKit creates the key with the structure to enable compact point encoding.
signature(data: ArrayBuffer): P521_Signing_ECDSASignatureSwift declarationfunc signature<D>(for data: D) throws -> P521.Signing.ECDSASignature where D : DataProtocolGenerates an Elliptic Curve Digital Signature Algorithm (ECDSA) signature of the data you provide over the P-521 elliptic curve, using SHA-512 as the hash function. - Parameters: - data: The data to sign. - Returns: The signature corresponding to the data. The signing algorithm employs randomization to generate a different signature on every call, even for the same data and key.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
P521.Signing.PrivateKey.signature(for:)
This declaration needs Swift generic type arguments. (no canonical witness for D)