WebCrypto GOST Class: EncryptedDataContentInfo

GostCMS. EncryptedDataContentInfo

Constructor

new EncryptedDataContentInfo(contentInfo)

This class encapsulates a CMS object of content type encrypted-data.
Parameters:
Name Type Description
contentInfo FormatedData | GostASN1.ContentInfo The encrypted data content.
Source:

Extends

Methods

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:

encloseContent(contentInfo, contentEncryptionKey, encryptionAlgorithm) → {Promise}

Encrypt the content with given encryption algorithm, secret key or password
Parameters:
Name Type Description
contentInfo FormatedData | GostASN1.ContentInfo The content data to be enclosed.
contentEncryptionKey Key | string content The encryption key or password for derive key
encryptionAlgorithm AlgorithmIdentifier | string The encryption algorithm or provider name
Overrides:
Source:
Returns:
Promise to return self object after encrypt content
Type
Promise

encode(format) → {FormatedData}

Encode the object
Parameters:
Name Type Description
format string Encoding format 'DER', 'CER' or 'PEM'
Inherited From:
Source:
Returns:
Type
FormatedData

getEnclosed(decryptionKey, contentInfo) → {Promise}

Returns the decrypted content.
Parameters:
Name Type Description
decryptionKey Key | string The decryption key or password for derive key
contentInfo FormatedData | GostASN1.ContentInfo The detached content (optional).
Overrides:
Source:
Returns:
Promise to return enclosed object {@ling GostASN1.ContentInfo} after decrypt content
Type
Promise

setEnclosed(contentInfo)

Sets the content of attached document.

This is necessary only in detached mode.
Parameters:
Name Type Description
contentInfo FormatedData | GostASN1.ContentInfo The encapsulated CMS Object.
Inherited From:
Source:

writeDetached(createDetached)

Indicates if an external (detached) signature must be created.
Parameters:
Name Type Description
createDetached boolean True if detached; false otherwise.
Inherited From:
Source: