easy-gpg-to-paper
easy-gpg-to-paper copied to clipboard
Support import of multiple barcodes in single png
Steps to prepare:
- Export the key to png
./gpg2paper.py export --keyid 123213232 --png --out ~/.gnupg/123213232.png
- Place the created barcodes into a single paper (using imagemagick)
montage -mode concatenate -tile 2x ~/.gnupg/123213232.png* ~/.gnupg/123213232-full.png
- Import the created image
./gpg2paper.py import --png --pubkey ~/.gnupg/123213232.pub --in ~/.gnupg/123213232-full.png
Current behavior
/gpg2paper.py import --png --pubkey ~/.gnupg/123213232.pub --in ~/.gnupg/123213232-full.png
scanned 4 barcode symbols from 1 images in 0.56 seconds
Traceback (most recent call last):
File "./gpg2paper.py", line 274, in <module>
sys.exit(main())
File "./gpg2paper.py", line 109, in main
do_import(args)
File "./gpg2paper.py", line 125, in do_import
return import_from_b64(args.pubkey, base64.b64decode(base64str))
File "/home/gt01/.virtualenvs/gpg/lib64/python3.7/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
Desired behavior
Key should be imported successfully.