---
title: "Encrypt PDF on iOS with AES | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/ios/security/encrypt-or-decrypt-files-on-the-server/"
md_url: "https://www.nutrient.io/guides/ios/security/encrypt-or-decrypt-files-on-the-server.md"
last_updated: "2026-06-08T17:11:05.537Z"
description: "Nutrient iOS SDK bundles two tools you can use to encrypt documents with AES:."
---

# Encrypt PDFs with AES on iOS

Nutrient iOS SDK bundles two tools you can use to encrypt documents with AES:

1. Our AESCryptor tool

2. The `cryptor-cli` command-line tool

## AESCryptor tool

When downloading Nutrient iOS SDK, we include a tool called AESCryptor, which lets you encrypt and decrypt files with ease. It’s located in the downloaded `.dmg` in **Extras** > **AESCryptor** > **AESCryptor.app**.

1. Open the AESCryptor application and select the file you want to encrypt under Input. A Finder window will open and allow you to select your desired document.

2. Now you need a password and salt to safely encrypt your file. This example uses the following values provided in `AESCryptoDataProviderExample.swift`.

- Password: `afghadöghdgdhfgöhapvuenröaoeruhföaeiruaerub`

- Salt: `ducrXn9WaRdpaBfMjDTJVjUf3FApA6gtim0e61LeSGWV9sTxB0r26mPs59Lbcexn`

3. Now click **Encrypt** to complete the encryption process.

Here’s how it should appear in the end:

## cryptor-cli

Nutrient iOS SDK bundles the `cryptor-cli` tool, which allows you to encrypt and decrypt files on a server. `cryptor-cli` is a standalone command-line tool written in Go, so it’ll work on Windows, macOS, and Linux/Unix. You can find `cryptor-cli` in the distribution DMG under `Extras/cryptor-cli`.

### Build

To build `cryptor-cli` on your system, follow these steps:

1. [Install Go](http://golang.org/doc/install). On Windows and macOS, package installers are available, and on Linux, you have to build from source.

2. `cd` to the `cryptor-cli` directory.

3. Type `go build`.

### Use

```sh./cryptor-cli -h
Usage of./cryptor-cli:
 -f=false: force overwrite of output file
 -in="": input file
 -o="encrypt": operation, can be [encrypt, decrypt]
 -out="": output file
 -p="": passphrase
 -s="": salt (optional)

```

#### Encrypt example

```sh./cryptor-cli -o "encrypt" -in "path/to/original.pdf" -out "path/to/encrypted" -p "test123" -s "salt"

```

#### Decrypt example

```sh./cryptor-cli -o "decrypt" -in "path/to/encrypted" -f -out "path/to/decrypted.pdf" -p "test123" -s "salt"

```
---

## Related pages

- [Decrypt PDFs with AES on iOS](/guides/ios/security/aesdataprovider.md)
- [Securing PDFs by adding watermarks on iOS](/guides/ios/document-security/add-a-watermark.md)
- [Document security on iOS](/guides/ios/document-security.md)
- [Creating password-protected PDFs on iOS](/guides/ios/document-security/add-a-password.md)
- [Managing PDF restrictions on iOS](/guides/ios/document-security/set-permissions.md)
- [Introduction to PDF encryption on iOS](/guides/ios/security/introduction-to-encryption.md)
- [Prevent sharing of PDF files on iOS](/guides/ios/document-security/prevent-sharing.md)

