Constructor
new SignalComPrivateKeyInfo(keyInfo, container)
A class for password-encrypted SignalCom private keys
Parameters:
| Name | Type | Description |
|---|---|---|
keyInfo |
GostASN1.PrivateKeyInfo | |
container |
GostKeys.SignalComKeyContainer |
- Source:
Extends
Methods
-
(static) getKey(keyPassword) → {Promise}
-
Get the private key info
Parameters:
Name Type Description keyPasswordstring The password for decryption - Source:
Returns:
Promise to return GostKeys.PKCS8- Type
- Promise
-
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) → {FormatedData}
-
Encode the object
Parameters:
Name Type Description formatstring Encoding format 'DER', 'CER' or 'PEM' - Inherited From:
- Source:
Returns:
- Type
- FormatedData
-
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
-
generateContainer(keyPassword) → {Promise}
-
Generate encryption key and container files
Parameters:
Name Type Description keyPasswordstring - Inherited From:
- Source:
Returns:
Promise to return Key- Type
- Promise
-
getEncryptionKey(keyPassword) → {Promise}
-
Get password-based encryption key
Parameters:
Name Type Description keyPasswordstring - Inherited From:
- Source:
Returns:
Promise to return Key- Type
- Promise
-
getPrivateKey(keyPassword) → {Promise}
-
Get the private key
Parameters:
Name Type Description keyPasswordstring The password for decryption - Source:
Returns:
Promise to return the Key- Type
- Promise
-
setKey(keyInfo, keyPassword) → {Promise}
-
Sets and encrypt the private key info
Parameters:
Name Type Description keyInfoFormatedData | GostKeys.PKCS8 The private key info keyPasswordstring The password for encryption - Source:
Returns:
Promise to return self object after set the key- Type
- Promise
-
setPrivateKey(privateKey, keyPassword) → {Promise}
-
Set the private key
Parameters:
Name Type Description privateKeyKey The private key keyPasswordstring The secret key encryption - Source:
Returns:
Promise to return self object after set the key- Type
- Promise