BTool.DeviceFormUtils.GetGapAuthReqStr C# (CSharp) Method

GetGapAuthReqStr() public method

public GetGapAuthReqStr ( byte authReq ) : string
authReq byte
return string
        public string GetGapAuthReqStr(byte authReq)
        {
            string result = string.Empty;
            if (authReq == 0)
                return "Gap Auth Req Bit Mask Is Not Set";

            if ((authReq & 0x01) != 0)
                result = "Bonding - exchange and save key information";
            if ((authReq & 0x04) != 0)
            {
                if (!string.IsNullOrEmpty(result))
                    result += newline_2tab;
                result += "Man-In-The-Middle protection";
            }
            if (string.IsNullOrEmpty(result))
                result = "Unknown Gap Auth Req";
            return result;
        }