encrypt
encryptBinary
¶
Encrypts binary data using a secret key.
@see decryptBinary
Parameters
Name | Type | Description |
---|---|---|
data |
any | The binary data to be encrypted. |
secret |
any | The secret key used for encryption. |
Returns: The encrypted binary data.
decryptBinary
¶
Decrypts binary data using a secret key.
@see encryptBinary
Parameters
Name | Type | Description |
---|---|---|
encryptedData |
any | The encrypted binary data to be decrypted. |
secret |
any | The secret key used for decryption. |
Returns: The decrypted binary data.
encryptString
¶
Encrypts a string using a secret key.
@see decryptString
Parameters
Name | Type | Description |
---|---|---|
data |
any | The string to be encrypted. |
secret |
any | The secret key used for encryption. |
Returns: The encrypted string in hexadecimal format.
decryptString
¶
Decrypts an encrypted string using a secret key.
@see encryptString
Parameters
Name | Type | Description |
---|---|---|
encryptedData |
any | The encrypted string to be decrypted. |
secret |
any | The secret key used for decryption. |
Returns: The decrypted string.
encryptFile
¶
Encrypts a file using a secret key.
@see decryptFile
Parameters
Name | Type | Description |
---|---|---|
input |
any | The path to the input file. |
output |
any | The path to the output file. |
secret |
any | The secret key used for encryption. |
Returns: A Promise that resolves when the encryption is complete.
decryptFile
¶
Decrypts a file using a secret key.
@see encryptFile
Parameters
Name | Type | Description |
---|---|---|
input |
any | The path of the input file to be decrypted. |
output |
any | The path of the output file where the decrypted content will be written. |
secret |
any | The secret key used for decryption. |
Returns: A Promise that resolves when the decryption is complete.