PrivateKeyContainer
public struct PrivateKeyContainer
Represents a (SecureEnclave) private key, namely PrK_SE_AUT, secured by iOS Biometrics.
[REQ:gemSpec_IDP_Frontend:A_21590] This is the container to represent biometric keys. Usage is limited to authorization purposes [REQ:BSI-eRp-ePA:O.Cryp_7#2] Container for private key operations using secure enclave private keys
-
Declaration
Swift
public enum Error : Swift.Error -
The public key associated with the private key.
Declaration
Swift
public let publicKey: SecKey -
The tag or identifier of the key
Declaration
Swift
public let tag: String -
Initializes a
PrivateKeyContainerfor a given tag. ThrowsPrivateKeyContainer.Errorin case of a failure.Throws
PrivateKeyContainer.Errorin case of a failure.Declaration
Swift
public init(with tag: String) throwsParameters
tagThe
tagor identifier of the key. -
Deletes an existing secure enclave key.
Throws
PrivateKeyContainer.Errorin case of a failure or a missing key.Declaration
Swift
public static func deleteExistingKey(for tag: String) throws -> BoolParameters
tagThe
tagor identifier of the key.Return Value
truein case of a success,throwsotherwise. -
Creates a
PrivateKeyContainerwith a given tag. ThrowsPrivateKeyContainer.Errorin case of a failure.Throws
PrivateKeyContainer.Errorin case of a failure or a missing key.Declaration
Swift
public static func createFromSecureEnclave(with tag: String) throws -> PrivateKeyContainerParameters
tagThe
tagor identifier of the key.Return Value
An instance of
PrivateKeyContainerif successfull. -
key creation without secure enclave for integration tests. Only available for simulator builds to enable integration tests.
Declaration
Swift
public static func createFromKeyChain(with tag: String) throws -> PrivateKeyContainer -
Sign the given
Datawith the private key.Throws
PrivateKeyContainer.Errorin case of a failure or a missing key.Declaration
Swift
public func sign(data: Data) throws -> DataParameters
dataData to sign with the private key.
Return Value
signature
View on GitHub
PrivateKeyContainer Structure Reference