Crates.io | wifi-qr-specs |
lib.rs | wifi-qr-specs |
version | 0.1.0 |
source | src |
created_at | 2022-10-12 12:15:08.008592 |
updated_at | 2022-10-12 12:15:08.008592 |
description | Wi-Fi QR specifications |
homepage | |
repository | https://github.com/Ghamza-Jd/wifi-qr-specs |
max_upload_size | |
id | 686261 |
size | 20,920 |
A small lib to create Wi-Fi spepcifications and pass them into a QR code generator to connect to a wifi.
use wifi_qr_specs::no_pass::NoPass;
let no_pass = NoPass::builder()
.ssid("ghamza")
.hidden(true)
.build()
.ok()
.map(|x| { println!("{}", x.encode()) });
use wifi_qr_specs::wep::WEP;
let no_pass = let wep = WEP::builder()
.ssid("ghamza")
.password("P@ssw0rd")
.hidden(true)
.build()
.ok()
.map(|x| { println!("{}", x.encode()) });
use wifi_qr_specs::wpa::WPA;
let no_pass = let wep = WPA::builder()
.ssid("ghamza")
.password("P@ssw0rd")
.hidden(true)
.build()
.ok()
.map(|x| { println!("{}", x.encode()) });
use wifi_qr_specs::wpa2_eap::{EAP, PHASE2METHOD, WPA2_EAP};
let wpa2eap = WPA2_EAP::builder()
.ssid("ghamza")
.password("P@ssw0rd")
.hidden(true)
.identity("Hamza")
.anonymous_identity("someone")
.eap_method(EAP::PEAP)
.phase_2_method(PHASE2METHOD::MSCHAPV2)
.build()
.ok()
.map(|x| { println!("{}", x.encode()) });