Constructor
new ViPNetContainerEntry(entry)
A class for password-encrypted private keys in ViPNet container entry
Parameters:
| Name | Type | Description |
|---|---|---|
entry |
FormatedData | GostKeys.ViPNetContainerEntry |
- Source:
Extends
Methods
-
(static) decode(entry) → {GostKeys.ViPNetContainer}
-
Decode container entry
Parameters:
Name Type Description entryFormatedData - Source:
Returns:
-
changePassword(oldKeyPassword, newKeyPassword) → {Promise}
-
Change key password
Parameters:
Name Type Description oldKeyPasswordstring Old key password newKeyPasswordstring New key password - Source:
Returns:
Promise to return self object after change password- Type
- Promise
-
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) → {CryptoOperationData}
-
Encode container entry
Parameters:
Name Type Description formatstring The encoded data format - Overrides:
- Source:
Returns:
- Type
- CryptoOperationData
-
generate(req, keyPassword, keyAlgorithm) → {Promise}
-
Generate private key, certificate and return certification request
Parameters:
Name Type Description reqFormatedData | GostASN1.CertificationRequest The request templates keyPasswordKey | CryptoOperationData | string The secret key or password for decryption keyAlgorithmAlgorithmIdentifier | string The name of provider or algorithm - Source:
Returns:
Promise to return GostCert.Request- Type
- Promise
-
getPrivateKey(keyPassword) → {Promise}
-
Get the private key
Parameters:
Name Type Description keyPasswordstring The password of secrect key for decryption - Source:
Returns:
Promise to return the Key- Type
- Promise
-
setPrivateKey(privateKey, keyPassword, days) → {Promise}
-
Set the private key
Parameters:
Name Type Description privateKeyKey The private key keyPasswordstring The secret key encryption daysnumber Validity days. Default 7305 days (20 years) - Source:
Returns:
Promise to return the self object after set the key- Type
- Promise
-
setPrivateKey(privateKey, keyPassword, index, days) → {Promise}
-
Set the private key
Parameters:
Name Type Description privateKeyKey The private key keyPasswordstring The secret key encryption indexnumber Index of the entriy. Default 0 daysnumber Validity days. Default 7305 days (20 years) - Source:
Returns:
Promise to return the self object after set the key- Type
- Promise