PsoEncipher
public struct PsoEncipher
Builders representing Encipher command in gemSpec_COS#14.8.4
-
Use case Encipher using transmitted RSA key Pkcs1_v1_5 gemSpec_COS#14.8.4.1_1
Note
Key data must be in PKCS #1 format for an RSA key, see Apple documentation on SecKeyCreateWithDataDeclaration
Swift
public static func encipherUsingTransmittedRsaKeyPkcs1_v1_5(rsaPublicKey: SecKey, data: Data) throws -> HealthCardCommand
Parameters
rsaPublicKey
SecKey must conform to PKCS #1 format for an RSA key
data
data to be enciphered
Return Value
The command
-
Use case Encipher using transmitted RSA key Oaep gemSpec_COS#14.8.4.1_2
Note
Key data must be in PKCS #1 format for an RSA key, see Apple documentation on SecKeyCreateWithDataDeclaration
Swift
public static func encipherUsingTransmittedRsaKeyOaep(rsaPublicKey: SecKey, data: Data) throws -> HealthCardCommand
Parameters
rsaPublicKey
SecKey must conform to PKCS #1 format for an RSA key
data
data to be enciphered
Return Value
The command
-
Use case Encipher using transmitted ELC key gemSpec_COS#14.8.4.2
Declaration
Swift
public static func encipherUsingTransmittedElcKey(elcPublicKey: SecKey, data: Data) throws -> HealthCardCommand
Parameters
data
data to be enciphered
Return Value
The command
-
Use cases Encipher using a RSA key saved on card gemSpec_COS#14.8.4.3
Declaration
Swift
public static func encipherUsingRsaKeyOnCard(data: Data) throws -> HealthCardCommand
Parameters
data
data to be enciphered
Return Value
The command
-
Use cases Encipher using a Elc key saved on card gemSpec_COS#14.8.4.4
Declaration
Swift
public static func encipherUsingElcKeyOnCard(data: Data) throws -> HealthCardCommand
Parameters
data
data to be enciphered
Return Value
The command
-
Use cases Encipher using a symmetric key saved on card gemSpec_COS#14.8.4.5
Declaration
Swift
public static func encipherUsingSymmetricKeyOnCard(data: Data) throws -> HealthCardCommand
Return Value
The command