Skip to content

Commit

Permalink
feat: add missing doc change
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoAmura committed Jan 6, 2025
1 parent acf9466 commit fa61714
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/sdk/access-control/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,21 @@ const accessControlConditions = [

### Encryption

To encrypt a string, use the following function:
To encrypt a string, use:

- [encryptString()](https://v7-api-doc-lit-js-sdk.vercel.app/functions/encryption_src.encryptString.html) - Used to encrypt the raw string.

To encrypt a file, use:

- [encryptFile()](https://v7-api-doc-lit-js-sdk.vercel.app/functions/encryption_src.encryptFile.html) - Used to encrypt a file without doing any zipping or packing. Because zipping larger files takes time, this function is useful when encrypting large files ( > 20mb). This also requires that you store the file metadata.

Apart from these, we have one more function which can be used to encrypt both strings and files:
To encrypt a Uint8Array, use:

- [encryptToJson()](https://v7-api-doc-lit-js-sdk.vercel.app/functions/encryption_src.encryptToJson.html) - Used to encrypt a string or file and serialise all the metadata required to decrypt i.e. accessControlConditions, evmContractConditions, solRpcConditions, unifiedAccessControlConditions & chain to JSON. It is useful for encrypting/decrypting data in IPFS or other storage without compressing it in a ZIP file.
- [encryptUint8Array()](https://v7-api-doc-lit-js-sdk.vercel.app/functions/encryption_src.encryptUint8Array.html) - Used to encrypt a Uint8Array, which can be the output of a [compression algorithm](https://github.com/LIT-Protocol/compression) or anything else that does not adhere to the string or file types.

Apart from those, we have one more function which can be used to encrypt both strings and files:

- [encryptToJson()](https://v7-api-doc-lit-js-sdk.vercel.app/functions/encryption_src.encryptToJson.html) - Used to encrypt a string or file and serialize all the metadata required to decrypt i.e. accessControlConditions, evmContractConditions, solRpcConditions, unifiedAccessControlConditions & chain to JSON. It is useful for encrypting/decrypting data in IPFS or other storage without compressing it in a ZIP file.

Encryption can be performed entirely client-side and doesn't require making a request to the Lit nodes.

Expand Down Expand Up @@ -556,4 +560,4 @@ By now you should have successfully created an Access Control Condition and perf
3. [Off-Chain Conditions](../access-control/lit-action-conditions.md).
4. [Custom Contract Calls](../access-control/evm/custom-contract-calls.md).

<FeedbackComponent/>
<FeedbackComponent/>

0 comments on commit fa61714

Please sign in to comment.