Skip to content

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

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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