Encrypts the document.
Name | Type | Description |
obj | object | The encryption properties. |
obj.type | string | The type of encrypting operation:
|
obj.password | string | A string value specifying the password to access the document. |
obj.data | string | Encrypted/decrypted changes. |
obj.check | boolean | Checks if the encryption/decryption operation is successful or not (used only for encryptData or decryptData types). |
obj.docinfo | string | An unencrypted part of the encrypted file. |
obj.hash | string | A string value specifying a file hash (sha256 by default). |
obj.error | string | A string value specifying an error that occurs (the "" value means that the operation is successful). |
window.Asc.plugin.executeMethod ("OnEncryption", [ { "type": "getPasswordByFile", "password": "123456", "docinfo": "{docinfo}", "hash": "sha256" } ]);