publicKey
TypeScriptget publicKey(): P256_Signing_PublicKeySwift declarationlet publicKey: P256.Signing.PublicKeyThe corresponding public key.
struct · iOS 13.0+ · SDK 27.1
struct PrivateKeyA P-256 private key used for signing.
get publicKey(): P256_Signing_PublicKeySwift declarationlet publicKey: P256.Signing.PublicKeyThe corresponding public key.
get dataRepresentation(): ArrayBufferSwift declarationlet dataRepresentation: DataA data representation of the private key.
static initDataRepresentationAuthenticationContext(dataRepresentation: ArrayBuffer, authenticationContext?: (_LocalAuthentication_LAContext) | null): SecureEnclave_P256_Signing_PrivateKeySwift declarationinit(dataRepresentation: Data, authenticationContext: LAContext? = nil) throwsCreates a P-256 private key for signing from a data representation of the key with the given authentication context. - Parameters: - dataRepresentation: A data representation of the key. - authenticationContext: A local authentication context.
static initCompactRepresentableAccessControlAuthenticationContext(compactRepresentable?: boolean, accessControl?: _Security_SecAccessControl, authenticationContext?: (_LocalAuthentication_LAContext) | null): SecureEnclave_P256_Signing_PrivateKeySwift declarationinit(compactRepresentable: Bool = true, accessControl: SecAccessControl = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly, [], nil)!, authenticationContext: LAContext? = nil) throwsCreates a P-256 private key for signing with the specified access control. - Parameters: - compactRepresentable: A Boolean value that indicates whether CryptoKit creates the key with the structure to enable compact point encoding. - accessControl: The protection type and flags to use when creating the associated access control object. - authenticationContext: A local authentication context.
signature(data: ArrayBuffer): P256_Signing_ECDSASignatureSwift declarationfunc signature<D>(for data: D) throws -> P256.Signing.ECDSASignature where D : DataProtocolGenerates an elliptic curve digital signature algorithm (ECDSA) signature of the given data over the P-256 elliptic curve, using SHA-256 as the hash function. - Parameters: - data: The data to sign. - Returns: A cryptographic signature. 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.
SecureEnclave.P256.Signing.PrivateKey.signature(for:)
This declaration needs Swift generic type arguments. (no canonical witness for D)