Skip to content

Instantly share code, notes, and snippets.

@speguero
Created August 9, 2024 14:29
Show Gist options
  • Save speguero/03e6ea8fcbb7a7419be8d7430856ec1e to your computer and use it in GitHub Desktop.
Save speguero/03e6ea8fcbb7a7419be8d7430856ec1e to your computer and use it in GitHub Desktop.
Creating Age Encrypted Private Key
$ printf 'foo\n' > testdata
$ age-keygen | age -p -o mykey.age
Public key: age1j85xmnxgavcach38x4nnzu2tcmdnj7vqq2d4ffmwjsdh9flcuy9sa8agsm
Enter passphrase (leave empty to autogenerate a secure one): mysecret
Confirm passphrase: mysecret
$ age -o testdata.age -r age1j85xmnxgavcach38x4nnzu2tcmdnj7vqq2d4ffmwjsdh9flcuy9sa8agsm testdata
$ age -d mykey.age | age -d -i - testdata.age
Enter passphrase: mysecret
foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment