WebCrypto GOST Class: DigestedDataContentInfo

GostCMS. DigestedDataContentInfo

Constructor

new DigestedDataContentInfo(contentInfo)

This class encapsulates a CMS object of content type digested-data.
Parameters:
Name Type Description
contentInfo FormatedData | GostASN1.ContentInfo The content that is to be signed.
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, digestAlgorithm) → {Promise}

Enclose the content and calculate the message digest with given digest algorithm
Parameters:
Name Type Description
contentInfo FormatedData | GostASN1.ContentInfo Content data to be enclosed.
digestAlgorithm AlgorithmIdentifier | string Digest algorithm or provider name
Overrides:
Source:
Returns:
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() → {GostASN1.ContentInfo}

Returns the document which attached. If the content is not attached, the CMS object which is returned will be degenerate.
Inherited From:
Source:
Returns:
The encapsulated CMS Object.
Type
GostASN1.ContentInfo

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:

verify(contentInfo) → {Promise}

Verify the Message Digest.

Parameters:
Name Type Description
contentInfo Detached content (optional)
Source:
Returns:
Promise to return enclosed object GostASN1.ContentInfo if digest verified
Type
Promise

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: