Creates a new PFX instance.
Configuration object
The authenticated safe content
Optional
macData?: MacDataOptional MAC data for integrity
Optional
version?: numberVersion number (defaults to 3)
The authenticated safe containing the encrypted content.
Optional
macOptional MAC data for integrity verification.
Version number (typically 3 for PKCS#12 v1.0).
Gets the PEM header name for this object type. Converts the class name to uppercase for use in PEM encoding.
Gets the PEM header name for PKCS#12 files.
Gets the PKI type name for this object (typically the class name). Used for PEM headers and debugging output.
Compares this PKI object with another for equality. Two objects are considered equal if their DER encodings are identical.
The other PKI object to compare with
true if the objects are equal, false otherwise
Parses this object as a different PKI type. Useful for converting between related PKI structures.
The target type to parse as
The target type constructor with parsing capabilities
A new instance of the target type
Converts this PKI object to DER (Distinguished Encoding Rules) format.
The DER-encoded bytes of this object
Returns a human-readable string representation of this object. By default, returns the same as toString(), but subclasses can override for more user-friendly output.
A human-readable string representation
Converts this PKI object to PEM (Privacy-Enhanced Mail) format.
A PEM-encoded string with appropriate headers
Returns a string representation of this PKI object. Includes the type name and ASN.1 structure.
A string representation for debugging
Static
createCreates a new PFX instance containing the given certificates and private keys.
Configuration object
Array of certificates to include
Optional
friendlyName?: stringOptional friendly name for the key/cert pairs
Password to encrypt the private keys
Array of private keys to include
A new PFX instance
Static
fromStatic
fromStatic
from
Represents a PFX structure in a PKCS#12 file.
PFX (Personal Information Exchange) is the main container format for PKCS#12 files. It can store private keys, certificates, and other cryptographic objects in a password-protected format. PKCS#12 files are commonly used for importing and exporting certificates and private keys between applications.
Asn
Example