Shell
$ echo 0_text > _0.txt
$ echo 1_text > _1.txt
$ echo 2_text > _2.txt
$
$ gpg --batch --passphrase 0 -c _0.txt
$ gpg --batch --passphrase 1 -c _1.txt
$ gpg --batch --passphrase 2 -c _2.txt
$
Shell
$ gpg -d _1.txt.gpg
gpg: данные зашифрованы алгоритмом AES256.CFB
gpg: зашифровано одной фразой-паролем
1_text
$
$ gpg -d _0.txt.gpg
gpg: данные зашифрованы алгоритмом AES256.CFB
gpg: зашифровано одной фразой-паролем
0_text
$
$ gpg -d _2.txt.gpg
gpg: данные зашифрованы алгоритмом AES256.CFB
gpg: зашифровано одной фразой-паролем
2_text
$
Shell
$ gpg -d _0.txt.gpg
gpg: данные зашифрованы алгоритмом AES256.CFB
gpg: зашифровано одной фразой-паролем
0_text
$
$ gpg -d _1.txt.gpg
gpg: данные зашифрованы алгоритмом AES256.CFB
gpg: зашифровано одной фразой-паролем
1_text
$
$ gpg -d _2.txt.gpg
gpg: данные зашифрованы алгоритмом AES256.CFB
gpg: зашифровано одной фразой-паролем
2_text
$
Shell
man gpg
...
--symmetric
-c Encrypt with a symmetric cipher using a passphrase. The default symmetric cipher used is AES-128, but may be chosen
with the --cipher-algo option. This command may be combined with --sign (for a signed and symmetrically encrypted mes‐
sage), --encrypt (for a message that may be decrypted via a secret key or a passphrase), or --sign and --encrypt to‐
gether (for a signed message that may be decrypted via a secret key or a passphrase). gpg caches the passphrase used
for symmetric encryption so that a decrypt operation may not require that the user needs to enter the passphrase. The
option --no-symkey-cache can be used to disable this feature.
Shell
$ gpg --no-symkey-cache
gpg: Внимание: команда не отдана. Пытаюсь угадать, что имелось в виду ...
gpg: Пишите сообщение ...
^C
gpg: signal Interrupt caught ... exiting
$