Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support import of multiple barcodes in single png #12

Open
gthieleb opened this issue Aug 26, 2019 · 0 comments
Open

Support import of multiple barcodes in single png #12

gthieleb opened this issue Aug 26, 2019 · 0 comments

Comments

@gthieleb
Copy link
Contributor

Steps to prepare:

  1. Export the key to png
./gpg2paper.py export --keyid 123213232 --png --out ~/.gnupg/123213232.png
  1. Place the created barcodes into a single paper (using imagemagick)
montage -mode concatenate -tile 2x ~/.gnupg/123213232.png* ~/.gnupg/123213232-full.png
  1. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant