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 sourceFormatedData 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 contentInfoFormatedData | GostASN1.ContentInfo The content data to be enclosed. contentEncryptionKeyKey | string content The encryption key or password for derive key encryptionAlgorithmAlgorithmIdentifier | 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 formatstring Encoding format 'DER', 'CER' or 'PEM' - Inherited From:
- Source:
Returns:
- Type
- FormatedData
-
getEnclosed(decryptionKey, contentInfo) → {Promise}
-
Returns the decrypted content.
Parameters:
Name Type Description decryptionKeyKey | string The decryption key or password for derive key contentInfoFormatedData | 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 contentInfoFormatedData | GostASN1.ContentInfo The encapsulated CMS Object. - Inherited From:
- Source:
-
writeDetached(createDetached)
-
Indicates if an external (detached) signature must be created.
Parameters:
Name Type Description createDetachedboolean True if detached; false otherwise. - Inherited From:
- Source: