ECPrimeRandomKey
public struct ECPrimeRandomKey
ECPrimeRandomKey is a representation of Elliptic Curve Key on iOS’ Secure Enclave to generate hardware-backed security key and to perform encryption, decryption, and signing operations using the key.
-
Extracts public key data and converts it into DER format
Throws
SecurityErrorDeclaration
Swift
public func getPublicKeyDERData() throws -> DataReturn Value
Bytes array of public key representation in DER format
-
Signs given bytes array using EC Prime Random Key using SHA256
Declaration
Swift
public func sign(data: Data) -> Data?Parameters
dataData object to be signed
Return Value
Signed data
-
Generates or retrieves EC Prime Random key with given information
Declaration
Swift
public static func getKeypair(label: String, accessGroup: String? = nil, context: LAContext? = nil) -> ECPrimeRandomKey?Parameters
labelLabel string value to generate or retrieve ECPrimeRandomKey object
accessGroupOptional Access Group string to be shared using Shared Keychain Service
contextOptional LAContext to be used to retrieve the key
Return Value
ECPrimeRandomKey object
View on GitHub