PCSDKModule Documentation

Class PCKeys​Manager

public final class PCKeysManager  

Creates and manages assymetric keypairs

Initializers

init(application​Tag:​)

public init(
        applicationTag: String
    )  

Creates new instance of the manager

Parameters

application​Tag String

The application tag to assign to keypairs

Methods

create​Key​Pair(label:​overwrite:​)

@discardableResult
    public func createKeyPair(
        label: String,
        overwrite: Bool = false
    ) throws -> KeyPair  

Creates the new keypair with provided label

Parameters

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

remove​Key​Pair(label:​)

public func removeKeyPair(
        label: String
    )  

Removes the keypair with provided label

Parameters

label String

The keypair's label

retrieve​Key​Pair(label:​)

public func retrieveKeyPair(
        label: String
    ) throws -> KeyPair  

Retrieves keypair with provided label

Parameters

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