Class
PCKeysManager
public final class PCKeysManager
Creates and manages assymetric keypairs
Initializers
init(applicationTag:)
public init(
applicationTag: String
)
Creates new instance of the manager
Parameters
Name | Type | Description |
---|---|---|
applicationTag | String |
The application tag to assign to keypairs |
Methods
createKeyPair(label:overwrite:)
@discardableResult
public func createKeyPair(
label: String,
overwrite: Bool = false
) throws -> KeyPair
Creates the new keypair with provided label
Parameters
Name | Type | Description |
---|---|---|
label | String |
The keypair's label |
overwrite | Bool |
Should overwrite the existing keypair |
Throws
Could throw an error if coudn't create the keypair or if other reason
Returns
The new KeyPair
object
removeKeyPair(label:)
public func removeKeyPair(
label: String
)
Removes the keypair with provided label
Parameters
Name | Type | Description |
---|---|---|
label | String |
The keypair's label |
retrieveKeyPair(label:)
public func retrieveKeyPair(
label: String
) throws -> KeyPair
Retrieves keypair with provided label
Parameters
Name | Type | Description |
---|---|---|
label | String |
The keypair's label |
Throws
Could throw an error if coudn't find the keypair or if other reason
Returns
The KeyPair
object