blob: b7ef50d71afce19df45070b75ba9b5b2dd7be815 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/env bash
set -Eeuo pipefail
yellow "Exporting public key..."
gpg --export --armor -a EuAndreh > keys
green "Done."
yellow "Exporting private key..."
read -p "A prompt for the GPG password will appear! (Press any key to continue)" -n 1 -r
gpg --export-secret-keys --armor -a EuAndreh >> keys
green "Done."
yellow "Encrypting key pair..."
read -p "A prompt for the symmetric encryption key of the keys.gpg file will appear! (Press any key to continue)" -n 1 -r
gpg --cipher-algo AES256 -c keys
green "Done."
yellow "Removing traces of private key..."
shred keys
rm keys
green "Done."
blue "File 'keys.gpg' create!"
|