sh 生成可打印的QR码以持久存储GPG私钥

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 生成可打印的QR码以持久存储GPG私钥相关的知识,希望对你有一定的参考价值。

# Heavily depends on:
# libqrencode (fukuchi.org/works/qrencode/)
# paperkey (jabberwocky.com/software/paperkey/)
# zbar (zbar.sourceforge.net)

# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done

# Importing the QR codes:
# Note that, when making scans or photographs, you do not produce large images.
# If zbar does not recognise your QR code, try downscaling the image.
for f in IMG*.png; do zbarimg --raw $f | head -c -1 > $f.out ; done
cat *.out | base64 -d | paperkey --pubring ~/.gnupg/pubring.gpg | gpg --import

以上是关于sh 生成可打印的QR码以持久存储GPG私钥的主要内容,如果未能解决你的问题,请参考以下文章

gpg加密使用

fastReport 怎么打印QR 二维码 那位盆友可提供解决方法

Linux下GPG的使用

URL 作为条形码(不是 QR)

ThoughtWorks.QRCode 生成QR二维码时提示“索引超出了数组界限”的原因和解决方法

如何使用 PayPal-Ruby-SDK 生成授权码以供将来付款?