WebCrypto GOST Class: SignalComPrivateKeyInfo

GostKeys. SignalComPrivateKeyInfo

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
keyPassword string The password for decryption
Source:
Returns:
Promise to return GostKeys.PKCS8
Type
Promise

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) → {FormatedData}

Encode the object
Parameters:
Name Type Description
format string 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
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

generateContainer(keyPassword) → {Promise}

Generate encryption key and container files
Parameters:
Name Type Description
keyPassword string
Inherited From:
Source:
Returns:
Promise to return Key
Type
Promise

getEncryptionKey(keyPassword) → {Promise}

Get password-based encryption key
Parameters:
Name Type Description
keyPassword string
Inherited From:
Source:
Returns:
Promise to return Key
Type
Promise

getPrivateKey(keyPassword) → {Promise}

Get the private key
Parameters:
Name Type Description
keyPassword string 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
keyInfo FormatedData | GostKeys.PKCS8 The private key info
keyPassword string 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
privateKey Key The private key
keyPassword string The secret key encryption
Source:
Returns:
Promise to return self object after set the key
Type
Promise