1 unstable release
0.1.0 | Oct 12, 2022 |
---|
#23 in #specs
16KB
458 lines
Wi-Fi QR Specifications
A small lib to create Wi-Fi spepcifications and pass them into a QR code generator to connect to a wifi.
Example Usage
No Password
use wifi_qr_specs::no_pass::NoPass;
let no_pass = NoPass::builder()
.ssid("ghamza")
.hidden(true)
.build()
.ok()
.map(|x| { println!("{}", x.encode()) });
WEP
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()) });
WPA
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()) });
WPA2 EAP
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()) });