Encrypt
ArConnect Injected API encrypt() function
Last updated
ArConnect Injected API encrypt() function
Last updated
Some applications (such as private file storage apps, mail clients, messaging platforms) might want to upload content to Arweave that is encrypted and only accessible by the user via their private key. The encrypt()
function does just that: it encrypts data with the active private key and returns the encrypted bytes, similarly to the webcrypto encrypt API.
Argument | Type | Description |
---|---|---|
Note: This function requires the ENCRYPT
permission.
data
The data to be encrypted with the user's private key
algorithm
An object specifying the algorithm to be used and any extra parameters if required