Crates.io | wifi-qr-code |
lib.rs | wifi-qr-code |
version | 0.1.0 |
source | src |
created_at | 2019-12-24 20:06:23.897519 |
updated_at | 2019-12-24 20:06:23.897519 |
description | Library for generating WiFi QR codes |
homepage | |
repository | https://github.com/amy-keibler/wifi-qr-code |
max_upload_size | |
id | 192186 |
size | 53,785 |
Wifi QR codes are a way to encode wifi connection information and credentials into a QR code so that it can be scanned. They are supported via the latest Android and iOS phones, as well as other platforms. Unfortunately, there does not appear to be a standardized format for the data, so this implementation consults existing implementations (linked in the References section). If a standard becomes available, please let me know.
It is important to take into account that QR codes do not provide any security mechanisms that would prevent someone from just reading the code and recovering the password for the network. Android requires that you re-authenticate before it will display the QR code on the screen to make sure the user is allowed to share that information, for example. My particular use-case is that I want a way to share my guest wifi network information in a convenient manner with people visiting my place, so people with access to the code have already been trusted with access to the space.
This library wraps the qrcode-generator library's basic functions that allow a user to output the QR code as a matrix, as raw image data, as a PNG image, and as an SVG image. Additionally, the direct string representation is available if a different QR code library is desired. The documentation and the examples
folder have code that demonstrate usage.
Like most Rust projects, this is dual-licensed under the MIT and Apache 2.0 licenses.
Contributions are welcome! This project follows the same Code of Conduct that the Rust project uses.