When a passphrase is entered incorrectly, an empty output file is created.
My expectation was that no file would be created until after the program has performed the encryption operation.
$ echo "Hello World" > test.txt
$ age -p -o test.txt.age test.txt
Enter passphrase (leave empty to autogenerate a secure one): Test
Confirm passphrase: test
Error: passphrases didn't match
[ Did age not do what you expected? Could an error be more useful? Tell us: https://filippo.io/age/report ]
$ ls -l
-rw-r--r-- 1 user user 12 Nov 29 13:31 test.txt
-rw-r--r-- 1 user user 0 Nov 29 13:32 test.txt.age
What were you trying to do
Create an encrypted file using a symmetric key.
What happened
When a passphrase is entered incorrectly, an empty output file is created. My expectation was that no file would be created until after the program has performed the encryption operation.