PKCS12
@available(iOS 10.0, *)
public final class PKCS12
This class parses PKCS12 (.p12) file.
-
The private key contained in the PKCS12 file as SecKey.
Declaration
Swift
public let privateKey: SecKey
-
The private key contained in the PKCS12 file as Data.
Declaration
Swift
public let privateKeyData: Data
-
The private key contained in the PKCS12 file as PEM-formatted string.
Declaration
Swift
public let privateKeyPEM: String
-
The public key contained in the PKCS12 file as SecKey.
Declaration
Swift
public let publicKey: SecKey
-
The public key contained in the PKCS12 file as Data.
Declaration
Swift
public let publicKeyData: Data
-
The public key contained in the PKCS12 file as PEM-formatted string.
Declaration
Swift
public let publicKeyPEM: String
-
The certificate contained in the PKCS12 file as SecCertificate.
Declaration
Swift
public let certificate: SecCertificate
-
The public key contained in the PKCS12 file as Data.
Declaration
Swift
public let certificateData: Data
-
The public key contained in the PKCS12 file as PEM string.
Declaration
Swift
public let certificatePEM: String
-
Initialize and return an object of type PKCS12 if successful.
Declaration
Swift
public init?(data: NSData, password: String)
Parameters
data
The .p12 file data.
password
The password used to encrypt the .p12 file.
-
Initializes and returns an object of type PKCS12 if successful.
Declaration
Swift
public convenience init?(file: String, password: String)
Parameters
file
The PKCS12 file path.
password
The password used to encrypt the PKCS12 file.