1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/age.md
mackncheesiest 7a31c37ab1
age: fix argument ordering (#10413)
* The input file must be specified after all flags
2023-06-24 16:35:31 +02:00

1.1 KiB

age

A simple, modern and secure file encryption tool. More information: https://github.com/FiloSottile/age.

  • Generate an encrypted file that can be decrypted with a passphrase:

age --passphrase --output {{path/to/encrypted_file}} {{path/to/unencrypted_file}}

  • Generate a key pair, saving the private key to an unencrypted file and printing the public key to stdout:

age-keygen --output {{path/to/file}}

  • Encrypt a file with one or more public keys that are entered as literals:

age --recipient {{public_key_1}} --recipient {{public_key_2}} --output {{path/to/encrypted_file}} {{path/to/unencrypted_file}}

  • Encrypt a file to one or more recipients with their public keys specified in a file (one per line):

age --recipients-file {{path/to/recipients_file}} --output {{path/to/encrypted_file}} {{path/to/unencrypted_file}}

  • Decrypt a file with a passphrase:

age --decrypt --output {{path/to/decrypted_file}} {{path/to/encrypted_file}}

  • Decrypt a file with a private key file:

age --decrypt --identity {{path/to/private_key_file}} --output {{path/to/decrypted_file}} {{path/to/encrypted_file}}