Skip to content

yishilin14/asc-key-to-qr-code-gif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

asc-key-to-qr-code-gif

A script that converts ASCII-armored PGP keys (or any texts) to a series of QR codes.

This allows to transfer texts from a PC to other devices that can scan and decode QR codes. The script was originally made for transfering keys into Pass for iOS.

Dependencies

  1. libqrencode: Generate QR codes.
  2. imagemagick: Convert PNGs to GIF.
  3. (Optional) zbar: Read and test QR codes.

Usage

Execute ./asc-to-gif.sh input.txt output.gif.

An example of exporting ASCII-armored PGP keys and generate QR codes.

gpg --export -a "Key ID" > public.asc
gpg --export-secret-keys -a "Key ID" > private.asc
./asc-to-gif.sh public.asc public.gif
./asc-to-gif.sh private.asc private.gif

Docker

You can use docker to perform the conversions:

docker build . -t asc-key-to-qr-code-gif
docker run --rm -v $(pwd):/data -e "SRC=/data/public.asc" -e "DST=/data/public.gif" asc-key-to-qr-code-gif
docker run --rm -v $(pwd):/data -e "SRC=/data/private.asc" -e "DST=/data/private.gif" asc-key-to-qr-code-gif

About

Convert ASCII-armored PGP keys to animated QR code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published