GetPreferencesDictFromConfigData() 개인적인 정적인 메소드

Helper method: Get preferences dictionary from decrypted data. In editing mode, users have to enter the right SEB administrator password before they can access the settings contents and returns the decrypted bytes
private static GetPreferencesDictFromConfigData ( byte sebData, bool forEditing ) : Dictionary,System.Collections.Generic
sebData byte
forEditing bool
리턴 Dictionary,System.Collections.Generic
        public static Dictionary <string, object> DecryptSEBSettings(byte[] sebData, bool forEditing, ref string sebFilePassword, ref bool passwordIsHash, ref X509Certificate2 sebFileCertificateRef)
        {
            byte[] numArray1 = GZipByte.Decompress(sebData);
            if (numArray1 != null)
            {
                sebData = numArray1;
            }
            byte[] numArray2            = sebData.Clone() as byte[];
            string prefixStringFromData = SEBConfigFileManager.GetPrefixStringFromData(ref sebData);

            if (prefixStringFromData.CompareTo("pkhs") == 0)
            {
                sebData = SEBConfigFileManager.DecryptDataWithPublicKeyHashPrefix(sebData, forEditing, ref sebFileCertificateRef);
                if (sebData == null)
                {
                    return((Dictionary <string, object>)null);
                }
                prefixStringFromData = SEBConfigFileManager.GetPrefixStringFromData(ref sebData);
            }
            if (prefixStringFromData.CompareTo("pswd") == 0)
            {
                string passwordRequestText = SEBUIStrings.enterPassword;
                int    num1 = 5;
                string passphrase;
                byte[] numArray3;
                do
                {
                    --num1;
                    passphrase = ThreadedDialog.ShowPasswordDialogForm(SEBUIStrings.loadingSettings, passwordRequestText);
                    if (passphrase == null)
                    {
                        return((Dictionary <string, object>)null);
                    }
                    numArray3           = SEBProtectionController.DecryptDataWithPassword(sebData, passphrase);
                    passwordRequestText = SEBUIStrings.enterPasswordAgain;
                }while (numArray3 == null && num1 > 0);
                if (numArray3 == null)
                {
                    int num2 = (int)SEBMessageBox.Show(SEBUIStrings.decryptingSettingsFailed, SEBUIStrings.decryptingSettingsFailedReason, MessageBoxIcon.Hand, MessageBoxButtons.OK, forEditing);
                    return((Dictionary <string, object>)null);
                }
                sebData = numArray3;
                if (forEditing)
                {
                    sebFilePassword = passphrase;
                }
            }
            else
            {
                if (prefixStringFromData.CompareTo("pwcc") == 0)
                {
                    return(SEBConfigFileManager.DecryptDataWithPasswordForConfiguringClient(sebData, forEditing, ref sebFilePassword, ref passwordIsHash));
                }
                if (prefixStringFromData.CompareTo("plnd") != 0)
                {
                    if (prefixStringFromData.CompareTo("<?xm") == 0)
                    {
                        sebData = numArray2;
                    }
                    else
                    {
                        int num = (int)SEBMessageBox.Show(SEBUIStrings.settingsNotUsable, SEBUIStrings.settingsNotUsableReason, MessageBoxIcon.Hand, MessageBoxButtons.OK, forEditing);
                        return((Dictionary <string, object>)null);
                    }
                }
            }
            if (prefixStringFromData.CompareTo("<?xm") != 0)
            {
                sebData = GZipByte.Decompress(sebData);
            }
            Dictionary <string, object> dictFromConfigData = SEBConfigFileManager.GetPreferencesDictFromConfigData(sebData, forEditing);

            if (dictFromConfigData == null)
            {
                return((Dictionary <string, object>)null);
            }
            dictFromConfigData["sebConfigPurpose"] = (object)0;
            return(dictFromConfigData);
        }