Structure
KeyStore
public struct KeyStore
Tools to create Crypto keys
Methods
privateKey(x963Representation:)
public static func privateKey(x963Representation: Data) throws -> P256.KeyAgreement.PrivateKey
Returns a P256.KeyAgreement.PrivateKey instance of an ANSI x9.63 representation of the private key.
Parameters
| Name | Type | Description |
|---|---|---|
| x963Representation | Data |
ANSI x9.63 representation of the private key. |
Throws
An error during the private key process
Returns
P256.KeyAgreement.PrivateKey instance of the private key.
privateKey(rawRepresentation:)
public static func privateKey(rawRepresentation: Data) throws -> P256.KeyAgreement.PrivateKey
Returns a P256.KeyAgreement.PrivateKey instance of raw representation of the private key.
Parameters
| Name | Type | Description |
|---|---|---|
| rawRepresentation | Data |
raw representation of the private key. |
Throws
An error during the private key process
Returns
P256.KeyAgreement.PrivateKey instance of the private key.
privateKey(pemRepresentation:)
public static func privateKey(pemRepresentation: String) throws -> P256.KeyAgreement.PrivateKey
Returns a P256.KeyAgreement.PrivateKey instance of pem representation of the private key.
Parameters
| Name | Type | Description |
|---|---|---|
| pemRepresentation | String |
pem representation of the private key. |
Throws
An error during the private key process
Returns
P256.KeyAgreement.PrivateKey instance of the private key.
privateKey(derRepresentation:)
public static func privateKey(derRepresentation: Data) throws -> P256.KeyAgreement.PrivateKey
Returns a P256.KeyAgreement.PrivateKey instance of der representation of the private key.
Parameters
| Name | Type | Description |
|---|---|---|
| derRepresentation | Data |
der representation of the private key. |
Throws
An error during the private key process
Returns
P256.KeyAgreement.PrivateKey instance of the private key.
publicKey(x963Representation:)
public static func publicKey(x963Representation: Data) throws -> P256.KeyAgreement.PublicKey
Returns a P256.KeyAgreement.PublicKey instance of an ANSI x9.63 representation of the public key.
Parameters
| Name | Type | Description |
|---|---|---|
| x963Representation | Data |
ANSI x9.63 representation of the public key. |
Throws
An error during the public key process
Returns
P256.KeyAgreement.PublicKey instance of the public key.
publicKey(rawRepresentation:)
public static func publicKey(rawRepresentation: Data) throws -> P256.KeyAgreement.PublicKey
Returns a P256.KeyAgreement.PublicKey instance of raw representation of the public key.
Parameters
| Name | Type | Description |
|---|---|---|
| rawRepresentation | Data |
raw representation of the public key. |
Throws
An error during the public key process
Returns
P256.KeyAgreement.PublicKey instance of the public key.
publicKey(pemRepresentation:)
public static func publicKey(pemRepresentation: String) throws -> P256.KeyAgreement.PublicKey
Returns a P256.KeyAgreement.PublicKey instance of the public key of a pem representation
Parameters
| Name | Type | Description |
|---|---|---|
| pemRepresentation | String |
pem representation of the public key. |
Throws
An error during the public key process
Returns
P256.KeyAgreement.PublicKey instance of the public key.
publicKey(derRepresentation:)
public static func publicKey(derRepresentation: Data) throws -> P256.KeyAgreement.PublicKey
Returns a P256.KeyAgreement.PublicKey instance of der representation of the public key.
Parameters
| Name | Type | Description |
|---|---|---|
| derRepresentation | Data |
der representation of the public key. |
Throws
An error during the public key process
Returns
P256.KeyAgreement.PublicKey instance of the public key.