WebCrypto GOST Class: ViPNetContainerEntry

GostKeys. ViPNetContainerEntry

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
entry FormatedData
Source:
Returns:
Type
GostKeys.ViPNetContainer

changePassword(oldKeyPassword, newKeyPassword) → {Promise}

Change key password
Parameters:
Name Type Description
oldKeyPassword string Old key password
newKeyPassword string 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
source FormatedData Encoded data
Inherited From:
Source:

encode(format) → {CryptoOperationData}

Encode container entry
Parameters:
Name Type Description
format string 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
req FormatedData | GostASN1.CertificationRequest The request templates
keyPassword Key | CryptoOperationData | string The secret key or password for decryption
keyAlgorithm AlgorithmIdentifier | 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
keyPassword string 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
privateKey Key The private key
keyPassword string The secret key encryption
days number 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
privateKey Key The private key
keyPassword string The secret key encryption
index number Index of the entriy. Default 0
days number Validity days. Default 7305 days (20 years)
Source:
Returns:
Promise to return the self object after set the key
Type
Promise