{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "pdfviewer-encryption",
  "framework": "winforms",
  "type": "registry:component",
  "component": "PdfViewer",
  "variant": "encryption",
  "dependencies": [
    "Syncfusion.Pdf.Windows"
  ],
  "description": "Sample that uses PdfDocument to generate a PDF, applies RC4 or AES encryption with user and owner passwords, then writes the encrypted file.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winforms/llms.txt",
    "skillPack": "syncfusion/winforms-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winforms/pdfviewer-encryption.md"
  },
  "files": [
    {
      "target": "src/components/pdfviewer-encryption/pdfviewer.Designer.cs",
      "content": "using System.Drawing;\nusing System.Windows.Forms;\n\nnamespace Encryption\n{\n    partial class Form1\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.button1 = new System.Windows.Forms.Button();\n            this.label1 = new System.Windows.Forms.Label();\n            this.pictureBox1 = new System.Windows.Forms.PictureBox();\n            this.label2 = new System.Windows.Forms.Label();\n            this.label3 = new System.Windows.Forms.Label();\n            this.groupBox1 = new System.Windows.Forms.GroupBox();\n            this.groupBox2 = new System.Windows.Forms.GroupBox();\n            this.rdButton256BitRevision6 = new System.Windows.Forms.RadioButton();\n            this.rdButton256Bit = new System.Windows.Forms.RadioButton();\n            this.rdButton128Bit = new System.Windows.Forms.RadioButton();\n            this.rdButton40Bit = new System.Windows.Forms.RadioButton();\n            this.groupBox3 = new System.Windows.Forms.GroupBox();\n            this.rdButtonAESGCM = new System.Windows.Forms.RadioButton();\n            this.rdButtonAES = new System.Windows.Forms.RadioButton();\n            this.rdButtonRC4 = new System.Windows.Forms.RadioButton();\n            this.groupBox4 = new System.Windows.Forms.GroupBox();\n            this.cmbEncrypt = new System.Windows.Forms.ComboBox();\n            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();\n            this.groupBox1.SuspendLayout();\n            this.groupBox2.SuspendLayout();\n            this.groupBox3.SuspendLayout();\n            this.groupBox4.SuspendLayout();\n            this.SuspendLayout();\n            //\n            // button1\n            //\n            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.button1.BackColor = System.Drawing.Color.Transparent;\n            this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));\n            this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));\n            this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));\n            this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;\n            this.button1.Location = new System.Drawing.Point(396, 432);\n            this.button1.Name = \"button1\";\n            this.button1.Size = new System.Drawing.Size(100, 28);\n            this.button1.TabIndex = 0;\n            this.button1.Text = \"PDF\";\n            this.button1.UseVisualStyleBackColor = false;\n            this.button1.Click += new System.EventHandler(this.button1_Click);\n            //\n            // label1\n            //\n            this.label1.Font = new System.Drawing.Font(\"Verdana\", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(64)))));\n            this.label1.Location = new System.Drawing.Point(13, 111);\n            this.label1.Name = \"label1\";\n            this.label1.Size = new System.Drawing.Size(507, 87);\n            this.label1.TabIndex = 1;\n            this.label1.Text = \"Click the button below to view a PDF created with Essential PDF. Please note that Adobe Reader or its equivalent is required to view the resultant document. However, AES-GCM encryption is not supported by Adobe Reader to view such documents, use Foxit Reader or another compatible PDF viewer.\";\n            //\n            // pictureBox1\n            //\n            this.pictureBox1.Image = System.Drawing.Image.FromFile(EncryptionDataSource.GetImagePath(EncryptionDataSource.HeaderImageFileName));\n            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;\n            this.pictureBox1.Location = new System.Drawing.Point(0, 0);\n            this.pictureBox1.Name = \"pictureBox1\";\n            this.pictureBox1.Size = new System.Drawing.Size(510, 110);\n            this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;\n            this.pictureBox1.TabIndex = 24;\n            this.pictureBox1.TabStop = false;\n            //\n            // label2\n            //\n            this.label2.AutoSize = true;\n            this.label2.Font = new System.Drawing.Font(\"Microsoft Sans Serif\", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label2.Location = new System.Drawing.Point(15, 21);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(219, 17);\n            this.label2.TabIndex = 25;\n            this.label2.Text = \"Owner password : syncfusion\";\n            //\n            // label3\n            //\n            this.label3.AutoSize = true;\n            this.label3.Font = new System.Drawing.Font(\"Microsoft Sans Serif\", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label3.Location = new System.Drawing.Point(16, 47);\n            this.label3.Name = \"label3\";\n            this.label3.Size = new System.Drawing.Size(208, 17);\n            this.label3.TabIndex = 26;\n            this.label3.Text = \"User password   : password\";\n            //\n            // groupBox1\n            //\n            this.groupBox1.Controls.Add(this.label3);\n            this.groupBox1.Controls.Add(this.label2);\n            this.groupBox1.Location = new System.Drawing.Point(16, 366);\n            this.groupBox1.Name = \"groupBox1\";\n            this.groupBox1.Size = new System.Drawing.Size(272, 75);\n            this.groupBox1.TabIndex = 27;\n            this.groupBox1.TabStop = false;\n            this.groupBox1.Text = \"Encryption Password\";\n            //\n            // groupBox2\n            //\n            this.groupBox2.Controls.Add(this.rdButton256BitRevision6);\n            this.groupBox2.Controls.Add(this.rdButton256Bit);\n            this.groupBox2.Controls.Add(this.rdButton128Bit);\n            this.groupBox2.Controls.Add(this.rdButton40Bit);\n            this.groupBox2.Location = new System.Drawing.Point(16, 200);\n            this.groupBox2.Name = \"groupBox2\";\n            this.groupBox2.Size = new System.Drawing.Size(272, 82);\n            this.groupBox2.TabIndex = 28;\n            this.groupBox2.TabStop = false;\n            this.groupBox2.Text = \"Key Size\";\n            //\n            // rdButton256BitRevision6\n            //\n            this.rdButton256BitRevision6.AutoSize = true;\n            this.rdButton256BitRevision6.Location = new System.Drawing.Point(8, 53);\n            this.rdButton256BitRevision6.Name = \"rdButton256BitRevision6\";\n            this.rdButton256BitRevision6.Size = new System.Drawing.Size(133, 20);\n            this.rdButton256BitRevision6.TabIndex = 3;\n            this.rdButton256BitRevision6.TabStop = true;\n            this.rdButton256BitRevision6.Text = \"256 Bit Revision 6\";\n            this.rdButton256BitRevision6.UseVisualStyleBackColor = true;\n            this.rdButton256BitRevision6.CheckedChanged += new System.EventHandler(this.rdButton256BitRevision6_CheckedChanged);\n            //\n            // rdButton256Bit\n            //\n            this.rdButton256Bit.AutoSize = true;\n            this.rdButton256Bit.Location = new System.Drawing.Point(189, 53);\n            this.rdButton256Bit.Name = \"rdButton256Bit\";\n            this.rdButton256Bit.Size = new System.Drawing.Size(64, 20);\n            this.rdButton256Bit.TabIndex = 2;\n            this.rdButton256Bit.TabStop = true;\n            this.rdButton256Bit.Text = \"256Bit\";\n            this.rdButton256Bit.UseVisualStyleBackColor = true;\n            this.rdButton256Bit.CheckedChanged += new System.EventHandler(this.rdButton256Bit_CheckedChanged);\n            //\n            // rdButton128Bit\n            //\n            this.rdButton128Bit.AutoSize = true;\n            this.rdButton128Bit.Checked = true;\n            this.rdButton128Bit.Location = new System.Drawing.Point(189, 23);\n            this.rdButton128Bit.Name = \"rdButton128Bit\";\n            this.rdButton128Bit.Size = new System.Drawing.Size(67, 20);\n            this.rdButton128Bit.TabIndex = 1;\n            this.rdButton128Bit.TabStop = true;\n            this.rdButton128Bit.Text = \"128 Bit\";\n            this.rdButton128Bit.UseVisualStyleBackColor = true;\n            this.rdButton128Bit.CheckedChanged += new System.EventHandler(this.rdButton128Bit_CheckedChanged);\n            //\n            // rdButton40Bit\n            //\n            this.rdButton40Bit.AutoSize = true;\n            this.rdButton40Bit.Location = new System.Drawing.Point(8, 25);\n            this.rdButton40Bit.Name = \"rdButton40Bit\";\n            this.rdButton40Bit.Size = new System.Drawing.Size(60, 20);\n            this.rdButton40Bit.TabIndex = 0;\n            this.rdButton40Bit.TabStop = true;\n            this.rdButton40Bit.Text = \"40 Bit\";\n            this.rdButton40Bit.UseVisualStyleBackColor = true;\n            this.rdButton40Bit.CheckedChanged += new System.EventHandler(this.rdButton40Bit_CheckedChanged);\n            //\n            // groupBox3\n            //\n            this.groupBox3.Controls.Add(this.rdButtonAESGCM);\n            this.groupBox3.Controls.Add(this.rdButtonAES);\n            this.groupBox3.Controls.Add(this.rdButtonRC4);\n            this.groupBox3.Location = new System.Drawing.Point(312, 200);\n            this.groupBox3.Name = \"groupBox3\";\n            this.groupBox3.Size = new System.Drawing.Size(173, 82);\n            this.groupBox3.TabIndex = 29;\n            this.groupBox3.TabStop = false;\n            this.groupBox3.Text = \"Encryption Algorithm\";\n            //\n            // rdButtonAESGCM\n            //\n            this.rdButtonAESGCM.AutoSize = true;\n            this.rdButtonAESGCM.Location = new System.Drawing.Point(8, 53);\n            this.rdButtonAESGCM.Name = \"rdButtonAESGCM\";\n            this.rdButtonAESGCM.Size = new System.Drawing.Size(85, 20);\n            this.rdButtonAESGCM.TabIndex = 2;\n            this.rdButtonAESGCM.TabStop = true;\n            this.rdButtonAESGCM.Text = \"AESGCM\";\n            this.rdButtonAESGCM.UseVisualStyleBackColor = true;\n            this.rdButtonAESGCM.CheckedChanged += new System.EventHandler(this.rdButtonAESGCM_CheckedChanged);\n            //\n            // rdButtonAES\n            //\n            this.rdButtonAES.AutoSize = true;\n            this.rdButtonAES.Checked = true;\n            this.rdButtonAES.Location = new System.Drawing.Point(104, 25);\n            this.rdButtonAES.Name = \"rdButtonAES\";\n            this.rdButtonAES.Size = new System.Drawing.Size(55, 20);\n            this.rdButtonAES.TabIndex = 1;\n            this.rdButtonAES.TabStop = true;\n            this.rdButtonAES.Text = \"AES\";\n            this.rdButtonAES.UseVisualStyleBackColor = true;\n            this.rdButtonAES.CheckedChanged += new System.EventHandler(this.rdButtonAES_CheckedChanged);\n            //\n            // rdButtonRC4\n            //\n            this.rdButtonRC4.AutoSize = true;\n            this.rdButtonRC4.Location = new System.Drawing.Point(8, 25);\n            this.rdButtonRC4.Name = \"rdButtonRC4\";\n            this.rdButtonRC4.Size = new System.Drawing.Size(54, 20);\n            this.rdButtonRC4.TabIndex = 0;\n            this.rdButtonRC4.TabStop = true;\n            this.rdButtonRC4.Text = \"RC4\";\n            this.rdButtonRC4.UseVisualStyleBackColor = true;\n            this.rdButtonRC4.CheckedChanged += new System.EventHandler(this.rdButtonRC4_CheckedChanged);\n            //\n            // groupBox4\n            //\n            this.groupBox4.Controls.Add(this.cmbEncrypt);\n            this.groupBox4.Location = new System.Drawing.Point(16, 292);\n            this.groupBox4.Name = \"groupBox4\";\n            this.groupBox4.Size = new System.Drawing.Size(272, 62);\n            this.groupBox4.TabIndex = 31;\n            this.groupBox4.TabStop = false;\n            this.groupBox4.Text = \"Encryption Options \";\n            //\n            // cmbEncrypt\n            //\n            this.cmbEncrypt.FormattingEnabled = true;\n            this.cmbEncrypt.Items.AddRange(new object[] {\n            \"Encrypt all contents\",\n            \"Encrypt all contents except metadata\",\n            \"Encrypt only attachments\"});\n            this.cmbEncrypt.Location = new System.Drawing.Point(3, 23);\n            this.cmbEncrypt.Name = \"cmbEncrypt\";\n            this.cmbEncrypt.Size = new System.Drawing.Size(265, 24);\n            this.cmbEncrypt.SelectedIndex = 0;\n            this.cmbEncrypt.TabIndex = 0;\n            //\n            // Form1\n            //\n            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.BackColor = System.Drawing.Color.White;\n            this.ClientSize = new System.Drawing.Size(510, 479);\n            this.Controls.Add(this.groupBox4);\n            this.Controls.Add(this.groupBox3);\n            this.Controls.Add(this.groupBox2);\n            this.Controls.Add(this.groupBox1);\n            this.Controls.Add(this.button1);\n            this.Controls.Add(this.pictureBox1);\n            this.Controls.Add(this.label1);\n            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\n            this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(EncryptionDataSource.GetImagePath(EncryptionDataSource.IconFileName));\n            this.MaximizeBox = false;\n            this.MinimizeBox = false;\n            this.Name = \"Form1\";\n            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n            this.Text = \"Encryption\";\n            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();\n            this.groupBox1.ResumeLayout(false);\n            this.groupBox1.PerformLayout();\n            this.groupBox2.ResumeLayout(false);\n            this.groupBox2.PerformLayout();\n            this.groupBox3.ResumeLayout(false);\n            this.groupBox3.PerformLayout();\n            this.groupBox4.ResumeLayout(false);\n            this.ResumeLayout(false);\n\n        }\n\n        #endregion\n        private System.Windows.Forms.Button button1;\n        private System.Windows.Forms.Label label1;\n        private System.Windows.Forms.PictureBox pictureBox1;\n        private System.Windows.Forms.Label label2;\n        private System.Windows.Forms.Label label3;\n        private System.Windows.Forms.GroupBox groupBox1;\n        private System.Windows.Forms.GroupBox groupBox2;\n        private System.Windows.Forms.RadioButton rdButton256Bit;\n        private System.Windows.Forms.RadioButton rdButton128Bit;\n        private System.Windows.Forms.RadioButton rdButton40Bit;\n        private System.Windows.Forms.GroupBox groupBox3;\n        private System.Windows.Forms.RadioButton rdButtonAES;\n        private System.Windows.Forms.RadioButton rdButtonRC4;\n        private System.Windows.Forms.RadioButton rdButton256BitRevision6;\n        private System.Windows.Forms.RadioButton rdButtonAESGCM;\n        private System.Windows.Forms.GroupBox groupBox4;\n        private System.Windows.Forms.ComboBox cmbEncrypt;\n    }\n}\n"
    },
    {
      "target": "src/components/pdfviewer-encryption/pdfviewer.cs",
      "content": "using System;\nusing System.Drawing;\nusing System.IO;\nusing System.Windows.Forms;\nusing Syncfusion.Pdf;\nusing Syncfusion.Pdf.Graphics;\nusing Syncfusion.Pdf.Interactive;\nusing Syncfusion.Pdf.Security;\nusing Syncfusion.Windows.Forms;\n\nnamespace Encryption\n{\n    /// <summary>\n    /// Demonstrates how to protect a generated PDF document with the\n    /// Essential PDF security settings (key size, algorithm, passwords and\n    /// encryption options).\n    /// </summary>\n    public partial class Form1 : MetroForm\n    {\n        #region Constructor\n        public Form1()\n        {\n            //\n            // Required for Windows Form Designer support\n            //\n            InitializeComponent();\n            this.MinimizeBox = true;\n        }\n        #endregion\n\n        #region Events\n        private void button1_Click(object sender, System.EventArgs e)\n        {\n            PdfDocument document = new PdfDocument();\n            PdfPage page = document.Pages.Add();\n            PdfGraphics graphics = page.Graphics;\n\n            PdfStandardFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 20f, PdfFontStyle.Bold);\n            PdfBrush brush = PdfBrushes.Black;\n\n            //Document security\n            PdfSecurity security = document.Security;\n\n            //Specify key size and encryption algorithm\n            if (rdButton40Bit.Checked)\n            {\n                //use 40 bits key in RC4 mode\n                security.KeySize = PdfEncryptionKeySize.Key40Bit;\n            }\n            else if (rdButton128Bit.Checked && rdButtonRC4.Checked)\n            {\n                //use 128 bits key in RC4 mode\n                security.KeySize = PdfEncryptionKeySize.Key128Bit;\n                security.Algorithm = PdfEncryptionAlgorithm.RC4;\n            }\n            else if (rdButton128Bit.Checked && rdButtonAES.Checked)\n            {\n                //use 128 bits key in AES mode\n                security.KeySize = PdfEncryptionKeySize.Key128Bit;\n                security.Algorithm = PdfEncryptionAlgorithm.AES;\n            }\n            else if (rdButton256Bit.Checked)\n            {\n                security.KeySize = PdfEncryptionKeySize.Key256Bit;\n                if (rdButtonAES.Checked)\n                {\n                    //use 256 bits key in AES mode\n                    security.Algorithm = PdfEncryptionAlgorithm.AES;\n                }\n                else if (rdButtonAESGCM.Checked)\n                {\n                    //use 256 bits key in AESGCM mode\n                    security.Algorithm = PdfEncryptionAlgorithm.AESGCM;\n                    document.FileStructure.Version = PdfVersion.Version2_0;\n                }\n            }\n            else if (rdButton256BitRevision6.Checked)\n            {\n                security.KeySize = PdfEncryptionKeySize.Key256BitRevision6;\n                security.Algorithm = PdfEncryptionAlgorithm.AES;\n            }\n            if (cmbEncrypt.SelectedIndex == 0 || !cmbEncrypt.Enabled)\n                security.EncryptionOptions = PdfEncryptionOptions.EncryptAllContents;\n            else if (cmbEncrypt.SelectedIndex == 1)\n                security.EncryptionOptions = PdfEncryptionOptions.EncryptAllContentsExceptMetadata;\n            else if (cmbEncrypt.SelectedIndex == 2)\n            {\n                security.EncryptionOptions = PdfEncryptionOptions.EncryptOnlyAttachments;\n                //Read the file\n                string attachmentPath = EncryptionDataSource.GetDataPath(EncryptionDataSource.AttachmentFileName);\n                if (File.Exists(attachmentPath))\n                {\n                    FileStream file = new FileStream(attachmentPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);\n\n                    //Creates an attachment\n                    PdfAttachment attachment = new PdfAttachment(EncryptionDataSource.AttachmentFileName, file);\n\n                    attachment.ModificationDate = DateTime.Now;\n\n                    attachment.Description = \"About Syncfusion\";\n\n                    attachment.MimeType = \"application/txt\";\n\n                    //Adds the attachment to the document\n                    document.Attachments.Add(attachment);\n                }\n            }\n\n            security.OwnerPassword = EncryptionDataSource.OwnerPassword;\n            security.Permissions = PdfPermissionsFlags.Print | PdfPermissionsFlags.FullQualityPrint;\n            security.UserPassword = EncryptionDataSource.UserPassword;\n\n            string text = \"Security options:\\n\\n\" + String.Format(\"KeySize: {0}\\n\\nEncryption Algorithm: {4}\\n\\nOwner Password: {1}\\n\\nPermissions: {2}\\n\\n\" +\n                \"User Password: {3}\", security.KeySize, security.OwnerPassword, security.Permissions, security.UserPassword, security.Algorithm);\n            if (rdButton256BitRevision6.Checked)\n            {\n                text += String.Format(\"\\n\\nRevision: {0}\", \"Revision6\");\n            }\n            else if (rdButton256Bit.Checked && rdButtonAES.Checked)\n            {\n                text += String.Format(\"\\n\\nRevision: {0}\", \"Revision5\");\n            }\n            else if (rdButton256Bit.Checked && rdButtonAESGCM.Checked)\n            {\n                text += String.Format(\"\\n\\nRevision: {0}\", \"Revision7\");\n            }\n\n            graphics.DrawString(\"Document is Encrypted with following settings\", font, brush, PointF.Empty);\n            font = new PdfStandardFont(PdfFontFamily.TimesRoman, 16f, PdfFontStyle.Bold);\n            graphics.DrawString(text, font, brush, new PointF(0, 40));\n\n            document.Save(EncryptionDataSource.GetOutputPath());\n            document.Close();\n\n            //Message box confirmation to view the created PDF document.\n            if (MessageBox.Show(\"Do you want to view the PDF file?\", \"PDF File Created\",\n                MessageBoxButtons.YesNo, MessageBoxIcon.Information)\n                == DialogResult.Yes)\n            {\n                //Launching the PDF file using the default application.\n                System.Diagnostics.Process process = new System.Diagnostics.Process();\n                process.StartInfo = new System.Diagnostics.ProcessStartInfo(EncryptionDataSource.GetOutputPath())\n                {\n                    UseShellExecute = true\n                };\n                process.Start();\n            }\n\n            this.Close();\n        }\n\n        private void rdButton40Bit_CheckedChanged(object sender, EventArgs e)\n        {\n            if (rdButton40Bit.Checked)\n            {\n                rdButtonRC4.Enabled = true;\n                rdButtonRC4.Checked = true;\n                rdButtonAES.Enabled = false;\n                rdButtonAESGCM.Enabled = false;\n                cmbEncrypt.Enabled = false;\n            }\n        }\n\n        private void rdButton128Bit_CheckedChanged(object sender, EventArgs e)\n        {\n            rdButtonRC4.Enabled = true;\n            rdButtonAES.Enabled = true;\n            rdButtonAESGCM.Enabled = false;\n            cmbEncrypt.Enabled = !rdButtonRC4.Checked;\n        }\n\n        private void rdButton256Bit_CheckedChanged(object sender, EventArgs e)\n        {\n            rdButtonAESGCM.Enabled = true;\n            rdButtonAESGCM.Checked = true;\n            rdButtonAES.Enabled = true;\n            rdButtonAES.Checked = true;\n            rdButtonRC4.Enabled = false;\n            cmbEncrypt.Enabled = true;\n        }\n\n        private void rdButton256BitRevision6_CheckedChanged(object sender, EventArgs e)\n        {\n            rdButtonAES.Enabled = true;\n            rdButtonAES.Checked = true;\n            rdButtonAESGCM.Enabled = false;\n            rdButtonRC4.Enabled = false;\n            cmbEncrypt.Enabled = true;\n        }\n\n        private void rdButtonAESGCM_CheckedChanged(object sender, EventArgs e)\n        {\n            cmbEncrypt.Enabled = rdButtonAESGCM.Checked;\n        }\n\n        private void rdButtonAES_CheckedChanged(object sender, EventArgs e)\n        {\n            cmbEncrypt.Enabled = rdButtonAES.Checked;\n        }\n\n        private void rdButtonRC4_CheckedChanged(object sender, EventArgs e)\n        {\n            cmbEncrypt.Enabled = rdButton40Bit.Checked;\n        }\n        #endregion\n    }\n}\n"
    }
  ]
}