The primary modification has been in adding support for SVG generation.
The nqr
prefix stands for "Nitrogen QR" and is there to disambiguate it from
the original qrcode library by
Steve Davis.
The full commit/fork history can be viewed in the Github Network View.
Add this to your projects by adding this to your rebar.config:
{deps, [
nitro_qrcode
]}.
Reference used was ISO/IEC 18004, 1st Edition (2000)
This implementation is informed by my specific needs, i.e. to provide two-factor authentication for mobile phones running Google Authenticator.
- "Byte" mode only (don't need e.g. numeric mode or kanji mode).
- Encode only (no detection/decode).
- Basic supporting library functions provided (HOTP, PNG image functions) to allow full-cyle demo.
- Download repo and compile with
make
orerl -make
- Install Google Authenticator App on your mobile:
- Run demo:
nqr_demo:run().
- Open the generated
qrcode.png
file - Scan the qrcode into the phone.
- Ensure server clock is correct.
- The value of
nqr_demo:totp()
should show the same passcode as the phone. - Handle PINs/logins for the second part of the "two factor" according to your application design.
NOTE: This documentation is rather basic as this was open-sourced by specific request!