Constructor
new PKCS12(store)
An implementation of PKCS #12 password encryption/integrity modes. Both input and output are implemented.
A PFX object may contain multiple authenticated safes (represented as GostASN1.SafeContents objects). Each authenticated safe may have its own encryption method, and contains a number of bags (represented as instances of GostASN1.SafeBag).
Note: the methods and constructors that input a PFX object do not automatically check the validity of the MAC. You need to explicitly call verify() to make this check.
A PFX object may contain multiple authenticated safes (represented as GostASN1.SafeContents objects). Each authenticated safe may have its own encryption method, and contains a number of bags (represented as instances of GostASN1.SafeBag).
Note: the methods and constructors that input a PFX object do not automatically check the validity of the MAC. You need to explicitly call verify() to make this check.
Parameters:
| Name | Type | Description |
|---|---|---|
store |
FormatedData | GostASN1.PFX |
- Source:
Extends
Methods
-
check()
-
Check the object structure
- Inherited From:
- Source:
-
decode(source)
-
Decode the source to self object
Parameters:
Name Type Description sourceFormatedData Encoded data - Inherited From:
- Source:
-
encode(format) → {FormatedData}
-
Encode the object
Parameters:
Name Type Description formatstring Encoding format 'DER', 'CER' or 'PEM' - Inherited From:
- Source:
Returns:
- Type
- FormatedData
-
sign(password, digestAlgorithm) → {Promise}
-
Sign the enclosed content with given digest algorithm
Parameters:
Name Type Description passwordstring The password digestAlgorithmAlgorithmIdentifier | string Digest algorithm or provider name - Source:
Returns:
Promise to return self object after enclose content- Type
- Promise
-
verify(password) → {Promise}
-
Verifies the MAC.
Parameters:
Name Type Description passwordThe password for mac verification - Source:
Returns:
Promise to return self object after verification- Type
- Promise