summaryrefslogtreecommitdiff
path: root/scripts/exportkey.sh
blob: 90dbc0163174eb52e4fb28d084e6c6a02aeffa88 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# Backup GPG keys as DMTX for offline backup

# Generates key-aa, key-ab, ...
gpg --export-secret-key --armor $1 | split -b 1500 - key-

# Convert each of them to a PNG image
for K in key-*; do
    dmtxwrite -e 8 $K > $K.png
done