I created a (very) basic magic pattern so that file(1) can tell the user
that a data file was created with age (without the ascii armored, we get
the version number too). I didn't add a MIME type.
Sample outputs:
/tmp/age.txt: age encrypted data (ascii armored)
/tmp/age.dat: age encrypted data Version: 1
To add this to your magic database, create the /etc/file/magic/age file
and run the following line, as root:
# cd /etc/file && /usr/bin/file --compile
--- The rest of this message is the contents of /etc/file/magic/age ---
#------------------------------------------------------------------------------
# $File: age,v 1.1 2020/05/28 16:20:00 aerth Exp $
# age: file(1) magic for age encryption files
#
# format spec:
https://age-encryption.org/v1
0 string -----BEGIN\040AGE\040 age encrypted data (ascii armored)
0 string
age-encryption.org/ age encrypted data
>20 string x Version: %s