Encrypt file
Encrypt a file for one or more recipients' public keys, or with a passphrase only (symmetric), choosing the cipher and compression.
Command in the PGP toolkit · id ooa.pgp/encrypt · 10 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | File to encrypt. | |
| Target | File | No | Encrypted file to create; when empty, next to the file with .pgp added (.asc with armor), e.g. report.csv.pgp. | |
| Recipients | Any | No | Recipient key ids, fingerprints or email addresses (text or List); may be empty when public_key_file is given. | |
| Armor | Boolean | No | false | ASCII-armored output (text) instead of binary. |
| Gnupg home | File | No | Separate key folder for this agent; the runner user's keyring when empty (GnuPG's, or the built-in one when GnuPG is not installed). | |
| Public key file | File | No | Recipient's public key file (.asc or .gpg) to encrypt for, without importing it into a keyring first. | |
| Overwrite | Boolean | No | true | Replace an existing target file. |
| Cipher | String | No | default | Symmetric cipher for the data; default lets GnuPG choose from the recipients' key preferences (AES-128 for a passphrase). Older ciphers (CAST5, 3DES, BLOWFISH) only for old partners. |
| Compression | String | No | default | Compression before encryption; none for files that are already compressed, such as .zip or .jpg. |
| Passphrase | Credential | No | Passphrase that can decrypt the file. Alone it gives passphrase-only (symmetric) encryption; with recipients either the keys or the passphrase can decrypt. |
Outputs
| Output | Type | What it is |
|---|---|---|
| target | File | Full path of the encrypted file. |