CryptoKey
public struct CryptoKey
Helper struct to generate and sign the keys
-
Initializes CryptoKey with given keyId String
Declaration
Swift
public init(keyId: String, accessGroup: String? = nil)Parameters
keyIduser id for which key pair is to be generated
accessGroupOptional Access Group string
-
Query attributes dictionary for generating key pair
Declaration
Swift
public func keyBuilderQuery() -> [String : Any] -
Creates Keypair for the given builder query attributes
Throws
error during private/public key generationDeclaration
Swift
public func createKeyPair(builderQuery: [String : Any]) throws -> KeyPairParameters
builderQueryquery attributes dictionary for generating key pair
-
Get the private key from the Keychain for given key alias
Declaration
Swift
public func getSecureKey(pin: String? = nil, reason: String? = nil) -> SecKey?Parameters
pinpassword for the private key credential if applies
reasonlocalized reason for the authentication screen
Return Value
private key for the given key alias
-
Delete Keys from the Keychain
Declaration
Swift
public func deleteKeys() -
Get hash for the given key name (user id)
Declaration
Swift
public static func getKeyAlias(keyName: String) -> StringParameters
keyNamekey names to be hashed
Return Value
the hash for the given key name
View on GitHub