BTool.DeviceFormUtils.GetGapKeyDiskStr C# (CSharp) Method

GetGapKeyDiskStr() public method

public GetGapKeyDiskStr ( byte keyDisk ) : string
keyDisk byte
return string
        public string GetGapKeyDiskStr(byte keyDisk)
        {
            string result = string.Empty;
            if (keyDisk == 0)
                return "Gap Key Disk Bit Mask Is Not Set";

            if ((keyDisk & 0x01) != 0)
                result = "Slave Encryption Key";

            if ((keyDisk & 0x02) != 0)
            {
                if (!string.IsNullOrEmpty(result))
                    result += newline_2tab;
                result += "Slave Identification Key";
            }

            if ((keyDisk & 0x04) != 0)
            {
                if (!string.IsNullOrEmpty(result))
                    result += newline_2tab;
                result += "Slave Signing Key";
            }

            if ((keyDisk & 0x08) != 0)
            {
                if (!string.IsNullOrEmpty(result))
                    result += newline_2tab;
                result += "Master Encryption Key";
            }

            if ((keyDisk & 0x10) != 0)
            {
                if (!string.IsNullOrEmpty(result))
                    result += newline_2tab;
                result += "Master Identification Key";
            }

            if ((keyDisk & 0x20) != 0)
            {
                if (!string.IsNullOrEmpty(result))
                    result += newline_2tab;
                result += "Master Signing Key";
            }

            if (string.IsNullOrEmpty(result))
                result = "Unknown Gap Key Disk";
            return result;
        }