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

Python wrap #21

Open
wants to merge 35 commits into
base: develop
Choose a base branch
from
Open

Python wrap #21

wants to merge 35 commits into from

Conversation

typelogic
Copy link
Contributor

@typelogic typelogic commented Jun 2, 2022

Issue

Most of these changes are the addition of python files to wrap libidpasslite.so in python. There is an addition of one new function idpass_lite_qrcodesvg in idpass.h header file. The outputting in SVG format directly in libidpasslite.so solves a lot of problems as the SVG is a universally portable, and visually scalable format. The python wrapping is also further malleable and currently it almost look the same in the Java JNI wrapping, having class definitions Reader and Card.

In summary, the overall flow is:

johnsmith.json --> pythonwrapping --> qrcode.svg

where, the johnsmith.json is a json file containing identity details of a person, and the output is a qrcode.svg SVG format.

To see it in action, checkout the repo then:

  • cd python-wrap
  • ./run.sh
  • Then view the generated qrcode1.svg or qrcode2.svg in a browser
  • Scan the generated QR code using "Android ID PASS Smartscanner" (install from GooglePlay)
  • Edit ident1.json or create a new ident3.json then generate its QR code.
  • Notice in the ident json file the pin code field. You will enter it in the Smartscanner app to decode more identity fields.
  • Tinker on the IOCTL_SET_ACL in IDPassNative.py to control which fields are visible by default without need for pin authentication.
  • The privExtra fields in the identity json always requires pin authentication in order for this field's value to be visible
  • The pubExtra fields in the identity is visible by default without need for pin authentication.

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

Successfully merging this pull request may close these issues.

None yet

1 participant