public static bool TryConvert(DOT11_CIPHER_ALGORITHM source, out EncryptionType encryption) { switch (source) { case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_NONE: encryption = EncryptionType.None; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WEP40: encryption = EncryptionType.WEP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_TKIP: encryption = EncryptionType.TKIP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_CCMP: encryption = EncryptionType.AES; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WEP104: encryption = EncryptionType.WEP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WPA_USE_GROUP: encryption = EncryptionType.None; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WEP: encryption = EncryptionType.WEP; return(true); } encryption = default(EncryptionType); return(false); }
public static bool TryConvert(DOT11_CIPHER_ALGORITHM source, out CipherAlgorithm cipherAlgorithm) { switch (source) { case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_NONE: cipherAlgorithm = CipherAlgorithm.None; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WEP40: cipherAlgorithm = CipherAlgorithm.WEP40; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_TKIP: cipherAlgorithm = CipherAlgorithm.TKIP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_CCMP: cipherAlgorithm = CipherAlgorithm.CCMP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WEP104: cipherAlgorithm = CipherAlgorithm.WEP104; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WPA_USE_GROUP: cipherAlgorithm = CipherAlgorithm.WPA_USE_GROUP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_WEP: cipherAlgorithm = CipherAlgorithm.WEP; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_IHV_START: cipherAlgorithm = CipherAlgorithm.IHV_START; return(true); case DOT11_CIPHER_ALGORITHM.DOT11_CIPHER_ALGO_IHV_END: cipherAlgorithm = CipherAlgorithm.IHV_END; return(true); } cipherAlgorithm = default; return(false); }