Пример #1
0
        public static bool TryConvert(DOT11_AUTH_ALGORITHM source, out AuthenticationMethod authentication)
        {
            switch (source)
            {
            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_80211_OPEN:
                authentication = AuthenticationMethod.Open;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_80211_SHARED_KEY:
                authentication = AuthenticationMethod.Shared;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA:
                authentication = AuthenticationMethod.WPA_Enterprise;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA_PSK:
                authentication = AuthenticationMethod.WPA_Personal;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_RSNA:
                authentication = AuthenticationMethod.WPA2_Enterprise;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_RSNA_PSK:
                authentication = AuthenticationMethod.WPA2_Personal;
                return(true);
            }
            authentication = default(AuthenticationMethod);
            return(false);
        }
        public static bool TryConvert(DOT11_AUTH_ALGORITHM source, out AuthenticationAlgorithm authenticationAlgorithm)
        {
            switch (source)
            {
            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_80211_OPEN:
                authenticationAlgorithm = AuthenticationAlgorithm.Open;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_80211_SHARED_KEY:
                authenticationAlgorithm = AuthenticationAlgorithm.Shared;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA:
                authenticationAlgorithm = AuthenticationAlgorithm.WPA;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA_PSK:
                authenticationAlgorithm = AuthenticationAlgorithm.WPA_PSK;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA_NONE:
                authenticationAlgorithm = AuthenticationAlgorithm.WPA_NONE;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_RSNA:
                authenticationAlgorithm = AuthenticationAlgorithm.RSNA;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_RSNA_PSK:
                authenticationAlgorithm = AuthenticationAlgorithm.RSNA_PSK;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA3:
                authenticationAlgorithm = AuthenticationAlgorithm.WPA3;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA3_SAE:
                authenticationAlgorithm = AuthenticationAlgorithm.WPA3_SAE;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_OWE:
                authenticationAlgorithm = AuthenticationAlgorithm.OWE;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_IHV_START:
                authenticationAlgorithm = AuthenticationAlgorithm.IHV_START;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_IHV_END:
                authenticationAlgorithm = AuthenticationAlgorithm.IHV_END;
                return(true);
            }
            authenticationAlgorithm = default;
            return(false);
        }
Пример #3
0
        public static bool TryConvert(DOT11_AUTH_ALGORITHM source, out AuthType auth)
        {
            switch (source)
            {
            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_80211_OPEN:
                auth = AuthType.Open;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_80211_SHARED_KEY:
                auth = AuthType.Shared;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA:
                auth = AuthType.WPA;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA_PSK:
                auth = AuthType.WPA;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_WPA_NONE:
                auth = AuthType.WPA;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_RSNA:
                auth = AuthType.WPA2;
                return(true);

            case DOT11_AUTH_ALGORITHM.DOT11_AUTH_ALGO_RSNA_PSK:
                auth = AuthType.WPA2;
                return(true);
            }

            auth = default(AuthType);
            return(false);
        }