PKCS12
@available(iOS 10.0, *)
public final class PKCS12
A PKCS12 (.p12) file parsing class.
-
The private key contained in the file as SecKey.
Declaration
Swift
public let privateKey: SecKey
-
The private key contained in the file as Data.
Declaration
Swift
public let privateKeyData: Data
-
The private key contained in the file as PEM formatted string.
Declaration
Swift
public let privateKeyPEM: String
-
The public key contained in the file as SecKey.
Declaration
Swift
public let publicKey: SecKey
-
The public key contained in the file as Data.
Declaration
Swift
public let publicKeyData: Data
-
The public key contained in the file as PEM formatted string.
Declaration
Swift
public let publicKeyPEM: String
-
The certificate contained in the file as SecCertificate.
Declaration
Swift
public let certificate: SecCertificate
-
The public key contained in the file as Data.
Declaration
Swift
public let certificateData: Data
-
The public key contained in the file as PEM string.
Declaration
Swift
public let certificatePEM: String
-
Initializes and returns 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 .p12 file path
password
The password used to encrypt the .p12 file