2

We can connect to unknown wifi's using Manged wifi or simple wifi, But the main issue is how we will create profile to connect for diffrent types of wifi. How can we Differentiate wifi authentication type and Encryption type from a Unknown wifi in c#? whether it is wpa2psk or wpapsk like that....

when i tried the below code for my network which is Authentication:WPA2PSK and encryption:AES

 Wlan.WlanAvailableNetwork network = networks.Where(x => x.flags.HasFlag(Wlan.WlanAvailableNetworkFlags.Connected)).FirstOrDefault();
            var enc = network.dot11DefaultCipherAlgorithm.ToString();
            var auth= network.dot11DefaultAuthAlgorithm.ToString();

i got result

auth="RSNA_PSK"
enc="CCMP";

But i was expecting WPA2PSK and AES.

What should i do to get this?

Bugs
  • 4,491
  • 9
  • 32
  • 41
hilda_sonica_vish
  • 727
  • 3
  • 10
  • 31
  • @Ben : will it give the encryption type and authentication type? – hilda_sonica_vish Jul 12 '17 at 04:02
  • 1
    The structure has both `dot11DefaultAuthAlgorithm` and `dot11DefaultCipherAlgorithm` – Ben Voigt Jul 12 '17 at 04:04
  • i have tried this with a connection of wpa2psk, but what i got as result is RSNA_PSK. and the encryption type i could not find (AES) – hilda_sonica_vish Jul 12 '17 at 05:29
  • for my connection i was expecting WPA@PSK and AES which i couldnot find – hilda_sonica_vish Jul 12 '17 at 05:30
  • 1
    I still believe this is a duplicate, you have the information you asked for, you just need to do some research so you know what you are looking at. [The encryption schemes used by WPA are TKIP and CCMP. CCMP is based on AES.](https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Encryption_protocol) – Ben Voigt Jul 12 '17 at 13:45

0 Answers0