Browse Source

commit: add base64 codec

HOME 4 years ago
parent
commit
ee71d11aed
2 changed files with 282 additions and 23 deletions
  1. 235 23
      MiscToolSet/MainForm.Designer.cs
  2. 47 0
      MiscToolSet/MainForm.cs

+ 235 - 23
MiscToolSet/MainForm.Designer.cs

@@ -110,9 +110,24 @@
             this.InputCodeTextBox = new System.Windows.Forms.RichTextBox();
             this.ConvertedCodeTextBox = new System.Windows.Forms.RichTextBox();
             this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
+            this.PasteCodeButton = new System.Windows.Forms.Button();
             this.ConvertCodeButton = new System.Windows.Forms.Button();
             this.CopyButton = new System.Windows.Forms.Button();
-            this.PasteCodeButton = new System.Windows.Forms.Button();
+            this.tabPage9 = new System.Windows.Forms.TabPage();
+            this.splitContainer5 = new System.Windows.Forms.SplitContainer();
+            this.RawContentTextBox = new System.Windows.Forms.RichTextBox();
+            this.panel2 = new System.Windows.Forms.Panel();
+            this.RawContentLabel = new System.Windows.Forms.Label();
+            this.EncodingComboBox = new System.Windows.Forms.ComboBox();
+            this.PasteRawContentButton = new System.Windows.Forms.Button();
+            this.CopyRawContentButton = new System.Windows.Forms.Button();
+            this.Base64TextBox = new System.Windows.Forms.RichTextBox();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.Base64Label = new System.Windows.Forms.Label();
+            this.EncodeButton = new System.Windows.Forms.Button();
+            this.DecodeButton = new System.Windows.Forms.Button();
+            this.PasteBase64Button = new System.Windows.Forms.Button();
+            this.CopyBase64 = new System.Windows.Forms.Button();
             this.tabControl1.SuspendLayout();
             this.tabPage2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BulkNewGuidUpDown)).BeginInit();
@@ -144,6 +159,13 @@
             this.splitContainer2.Panel2.SuspendLayout();
             this.splitContainer2.SuspendLayout();
             this.flowLayoutPanel2.SuspendLayout();
+            this.tabPage9.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
+            this.splitContainer5.Panel1.SuspendLayout();
+            this.splitContainer5.Panel2.SuspendLayout();
+            this.splitContainer5.SuspendLayout();
+            this.panel2.SuspendLayout();
+            this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
             // PasswordHasherInputTextBox
@@ -152,7 +174,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.PasswordHasherInputTextBox.Location = new System.Drawing.Point(55, 44);
             this.PasswordHasherInputTextBox.Name = "PasswordHasherInputTextBox";
-            this.PasswordHasherInputTextBox.Size = new System.Drawing.Size(835, 21);
+            this.PasswordHasherInputTextBox.Size = new System.Drawing.Size(684, 21);
             this.PasswordHasherInputTextBox.TabIndex = 0;
             this.PasswordHasherInputTextBox.TextChanged += new System.EventHandler(this.txtToPasswordHash_TextChanged);
             // 
@@ -163,7 +185,7 @@
             this.PasswordHasherOutputTextBox.Location = new System.Drawing.Point(55, 71);
             this.PasswordHasherOutputTextBox.Name = "PasswordHasherOutputTextBox";
             this.PasswordHasherOutputTextBox.ReadOnly = true;
-            this.PasswordHasherOutputTextBox.Size = new System.Drawing.Size(835, 21);
+            this.PasswordHasherOutputTextBox.Size = new System.Drawing.Size(684, 21);
             this.PasswordHasherOutputTextBox.TabIndex = 1;
             this.PasswordHasherOutputTextBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.txtResultOfPasswordHash_MouseDoubleClick);
             // 
@@ -214,7 +236,7 @@
             this.GuidGeneratorResultAttributeTextBox.Location = new System.Drawing.Point(57, 91);
             this.GuidGeneratorResultAttributeTextBox.Name = "GuidGeneratorResultAttributeTextBox";
             this.GuidGeneratorResultAttributeTextBox.ReadOnly = true;
-            this.GuidGeneratorResultAttributeTextBox.Size = new System.Drawing.Size(833, 21);
+            this.GuidGeneratorResultAttributeTextBox.Size = new System.Drawing.Size(682, 21);
             this.GuidGeneratorResultAttributeTextBox.TabIndex = 7;
             this.GuidGeneratorResultAttributeTextBox.Text = "[Guid(\"D\")]";
             // 
@@ -225,7 +247,7 @@
             this.GuidGeneratorResultDTextBox.Location = new System.Drawing.Point(57, 37);
             this.GuidGeneratorResultDTextBox.Name = "GuidGeneratorResultDTextBox";
             this.GuidGeneratorResultDTextBox.ReadOnly = true;
-            this.GuidGeneratorResultDTextBox.Size = new System.Drawing.Size(833, 21);
+            this.GuidGeneratorResultDTextBox.Size = new System.Drawing.Size(682, 21);
             this.GuidGeneratorResultDTextBox.TabIndex = 3;
             this.GuidGeneratorResultDTextBox.Text = "D";
             // 
@@ -236,7 +258,7 @@
             this.GuidGeneratorResultNTextBox.Location = new System.Drawing.Point(57, 118);
             this.GuidGeneratorResultNTextBox.Name = "GuidGeneratorResultNTextBox";
             this.GuidGeneratorResultNTextBox.ReadOnly = true;
-            this.GuidGeneratorResultNTextBox.Size = new System.Drawing.Size(833, 21);
+            this.GuidGeneratorResultNTextBox.Size = new System.Drawing.Size(682, 21);
             this.GuidGeneratorResultNTextBox.TabIndex = 9;
             this.GuidGeneratorResultNTextBox.Text = "N";
             // 
@@ -247,7 +269,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.MachineKeyResult.Location = new System.Drawing.Point(6, 35);
             this.MachineKeyResult.Name = "MachineKeyResult";
-            this.MachineKeyResult.Size = new System.Drawing.Size(884, 265);
+            this.MachineKeyResult.Size = new System.Drawing.Size(733, 633);
             this.MachineKeyResult.TabIndex = 1;
             this.MachineKeyResult.Text = "";
             // 
@@ -281,6 +303,7 @@
             this.tabControl1.Controls.Add(this.tabPage6);
             this.tabControl1.Controls.Add(this.tabPage7);
             this.tabControl1.Controls.Add(this.tabPage8);
+            this.tabControl1.Controls.Add(this.tabPage9);
             this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.tabControl1.Location = new System.Drawing.Point(0, 0);
             this.tabControl1.Multiline = true;
@@ -398,7 +421,7 @@
             this.BulkNewGuidTextBox.Location = new System.Drawing.Point(7, 198);
             this.BulkNewGuidTextBox.Multiline = true;
             this.BulkNewGuidTextBox.Name = "BulkNewGuidTextBox";
-            this.BulkNewGuidTextBox.Size = new System.Drawing.Size(883, 278);
+            this.BulkNewGuidTextBox.Size = new System.Drawing.Size(732, 470);
             this.BulkNewGuidTextBox.TabIndex = 16;
             // 
             // GuidGeneratorCopyNewButton
@@ -428,7 +451,7 @@
             this.GuidGeneratorResultNewTextBox.Location = new System.Drawing.Point(57, 64);
             this.GuidGeneratorResultNewTextBox.Name = "GuidGeneratorResultNewTextBox";
             this.GuidGeneratorResultNewTextBox.ReadOnly = true;
-            this.GuidGeneratorResultNewTextBox.Size = new System.Drawing.Size(833, 21);
+            this.GuidGeneratorResultNewTextBox.Size = new System.Drawing.Size(682, 21);
             this.GuidGeneratorResultNewTextBox.TabIndex = 5;
             this.GuidGeneratorResultNewTextBox.Text = "new Guid(\"D\")";
             // 
@@ -528,7 +551,7 @@
             this.Md5HasherOutputTextBox.Location = new System.Drawing.Point(55, 163);
             this.Md5HasherOutputTextBox.Name = "Md5HasherOutputTextBox";
             this.Md5HasherOutputTextBox.ReadOnly = true;
-            this.Md5HasherOutputTextBox.Size = new System.Drawing.Size(835, 21);
+            this.Md5HasherOutputTextBox.Size = new System.Drawing.Size(684, 21);
             this.Md5HasherOutputTextBox.TabIndex = 1;
             this.Md5HasherOutputTextBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.txtResultOfPasswordHash_MouseDoubleClick);
             // 
@@ -538,7 +561,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.MD5HasherInputTextBox.Location = new System.Drawing.Point(55, 136);
             this.MD5HasherInputTextBox.Name = "MD5HasherInputTextBox";
-            this.MD5HasherInputTextBox.Size = new System.Drawing.Size(835, 21);
+            this.MD5HasherInputTextBox.Size = new System.Drawing.Size(684, 21);
             this.MD5HasherInputTextBox.TabIndex = 0;
             this.MD5HasherInputTextBox.TextChanged += new System.EventHandler(this.MD5HasherInputTextBox_TextChanged);
             // 
@@ -737,7 +760,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.PasswordGenerateResultRichTextBox.Location = new System.Drawing.Point(6, 65);
             this.PasswordGenerateResultRichTextBox.Name = "PasswordGenerateResultRichTextBox";
-            this.PasswordGenerateResultRichTextBox.Size = new System.Drawing.Size(884, 621);
+            this.PasswordGenerateResultRichTextBox.Size = new System.Drawing.Size(733, 603);
             this.PasswordGenerateResultRichTextBox.TabIndex = 2;
             this.PasswordGenerateResultRichTextBox.Text = "";
             // 
@@ -754,7 +777,7 @@
             this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
             this.tabPage5.Size = new System.Drawing.Size(747, 676);
             this.tabPage5.TabIndex = 4;
-            this.tabPage5.Text = "Drop to Base64";
+            this.tabPage5.Text = "Data URI";
             this.tabPage5.UseVisualStyleBackColor = true;
             // 
             // DataUrlMimeTypeTextBox
@@ -768,11 +791,13 @@
             // DataUrlCheckBox
             // 
             this.DataUrlCheckBox.AutoSize = true;
+            this.DataUrlCheckBox.Checked = true;
+            this.DataUrlCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
             this.DataUrlCheckBox.Location = new System.Drawing.Point(9, 10);
             this.DataUrlCheckBox.Name = "DataUrlCheckBox";
             this.DataUrlCheckBox.Size = new System.Drawing.Size(66, 16);
             this.DataUrlCheckBox.TabIndex = 5;
-            this.DataUrlCheckBox.Text = "DataURL";
+            this.DataUrlCheckBox.Text = "DataURI";
             this.DataUrlCheckBox.UseVisualStyleBackColor = true;
             // 
             // DropToBase64FileNameLabel
@@ -806,7 +831,7 @@
             this.DropToBase64TextBox.Location = new System.Drawing.Point(8, 32);
             this.DropToBase64TextBox.Name = "DropToBase64TextBox";
             this.DropToBase64TextBox.ReadOnly = true;
-            this.DropToBase64TextBox.Size = new System.Drawing.Size(882, 654);
+            this.DropToBase64TextBox.Size = new System.Drawing.Size(731, 638);
             this.DropToBase64TextBox.TabIndex = 2;
             this.DropToBase64TextBox.Text = "";
             // 
@@ -1139,6 +1164,16 @@
             this.flowLayoutPanel2.Size = new System.Drawing.Size(741, 32);
             this.flowLayoutPanel2.TabIndex = 6;
             // 
+            // PasteCodeButton
+            // 
+            this.PasteCodeButton.Location = new System.Drawing.Point(3, 3);
+            this.PasteCodeButton.Name = "PasteCodeButton";
+            this.PasteCodeButton.Size = new System.Drawing.Size(98, 23);
+            this.PasteCodeButton.TabIndex = 0;
+            this.PasteCodeButton.Text = "Paste";
+            this.PasteCodeButton.UseVisualStyleBackColor = true;
+            this.PasteCodeButton.Click += new System.EventHandler(this.PasteCodeButton_Click);
+            // 
             // ConvertCodeButton
             // 
             this.ConvertCodeButton.Location = new System.Drawing.Point(107, 3);
@@ -1159,15 +1194,167 @@
             this.CopyButton.UseVisualStyleBackColor = true;
             this.CopyButton.Click += new System.EventHandler(this.CopyButton_Click);
             // 
-            // PasteCodeButton
+            // tabPage9
             // 
-            this.PasteCodeButton.Location = new System.Drawing.Point(3, 3);
-            this.PasteCodeButton.Name = "PasteCodeButton";
-            this.PasteCodeButton.Size = new System.Drawing.Size(98, 23);
-            this.PasteCodeButton.TabIndex = 0;
-            this.PasteCodeButton.Text = "Paste";
-            this.PasteCodeButton.UseVisualStyleBackColor = true;
-            this.PasteCodeButton.Click += new System.EventHandler(this.PasteCodeButton_Click);
+            this.tabPage9.Controls.Add(this.splitContainer5);
+            this.tabPage9.Location = new System.Drawing.Point(4, 40);
+            this.tabPage9.Name = "tabPage9";
+            this.tabPage9.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage9.Size = new System.Drawing.Size(747, 676);
+            this.tabPage9.TabIndex = 8;
+            this.tabPage9.Text = "Base64";
+            this.tabPage9.UseVisualStyleBackColor = true;
+            // 
+            // splitContainer5
+            // 
+            this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer5.Location = new System.Drawing.Point(3, 3);
+            this.splitContainer5.Name = "splitContainer5";
+            this.splitContainer5.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainer5.Panel1
+            // 
+            this.splitContainer5.Panel1.Controls.Add(this.RawContentTextBox);
+            this.splitContainer5.Panel1.Controls.Add(this.panel2);
+            // 
+            // splitContainer5.Panel2
+            // 
+            this.splitContainer5.Panel2.Controls.Add(this.Base64TextBox);
+            this.splitContainer5.Panel2.Controls.Add(this.panel1);
+            this.splitContainer5.Size = new System.Drawing.Size(741, 670);
+            this.splitContainer5.SplitterDistance = 294;
+            this.splitContainer5.TabIndex = 4;
+            // 
+            // RawContentTextBox
+            // 
+            this.RawContentTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.RawContentTextBox.Location = new System.Drawing.Point(0, 32);
+            this.RawContentTextBox.Name = "RawContentTextBox";
+            this.RawContentTextBox.Size = new System.Drawing.Size(741, 262);
+            this.RawContentTextBox.TabIndex = 0;
+            this.RawContentTextBox.Text = "";
+            // 
+            // panel2
+            // 
+            this.panel2.Controls.Add(this.RawContentLabel);
+            this.panel2.Controls.Add(this.EncodingComboBox);
+            this.panel2.Controls.Add(this.PasteRawContentButton);
+            this.panel2.Controls.Add(this.CopyRawContentButton);
+            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel2.Location = new System.Drawing.Point(0, 0);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(741, 32);
+            this.panel2.TabIndex = 1;
+            // 
+            // RawContentLabel
+            // 
+            this.RawContentLabel.AutoSize = true;
+            this.RawContentLabel.Location = new System.Drawing.Point(3, 9);
+            this.RawContentLabel.Name = "RawContentLabel";
+            this.RawContentLabel.Size = new System.Drawing.Size(71, 12);
+            this.RawContentLabel.TabIndex = 1;
+            this.RawContentLabel.Text = "Raw Content";
+            // 
+            // EncodingComboBox
+            // 
+            this.EncodingComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.EncodingComboBox.FormattingEnabled = true;
+            this.EncodingComboBox.Location = new System.Drawing.Point(242, 6);
+            this.EncodingComboBox.Name = "EncodingComboBox";
+            this.EncodingComboBox.Size = new System.Drawing.Size(496, 20);
+            this.EncodingComboBox.TabIndex = 3;
+            // 
+            // PasteRawContentButton
+            // 
+            this.PasteRawContentButton.Location = new System.Drawing.Point(80, 4);
+            this.PasteRawContentButton.Name = "PasteRawContentButton";
+            this.PasteRawContentButton.Size = new System.Drawing.Size(75, 23);
+            this.PasteRawContentButton.TabIndex = 2;
+            this.PasteRawContentButton.Text = "Paste↓";
+            this.PasteRawContentButton.UseVisualStyleBackColor = true;
+            this.PasteRawContentButton.Click += new System.EventHandler(this.PasteRawContentButton_Click);
+            // 
+            // CopyRawContentButton
+            // 
+            this.CopyRawContentButton.Location = new System.Drawing.Point(161, 4);
+            this.CopyRawContentButton.Name = "CopyRawContentButton";
+            this.CopyRawContentButton.Size = new System.Drawing.Size(75, 23);
+            this.CopyRawContentButton.TabIndex = 2;
+            this.CopyRawContentButton.Text = "Copy";
+            this.CopyRawContentButton.UseVisualStyleBackColor = true;
+            this.CopyRawContentButton.Click += new System.EventHandler(this.CopyRawContentButton_Click);
+            // 
+            // Base64TextBox
+            // 
+            this.Base64TextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.Base64TextBox.Location = new System.Drawing.Point(0, 31);
+            this.Base64TextBox.Name = "Base64TextBox";
+            this.Base64TextBox.Size = new System.Drawing.Size(741, 341);
+            this.Base64TextBox.TabIndex = 1;
+            this.Base64TextBox.Text = "";
+            // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.Base64Label);
+            this.panel1.Controls.Add(this.EncodeButton);
+            this.panel1.Controls.Add(this.DecodeButton);
+            this.panel1.Controls.Add(this.PasteBase64Button);
+            this.panel1.Controls.Add(this.CopyBase64);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(741, 31);
+            this.panel1.TabIndex = 0;
+            // 
+            // Base64Label
+            // 
+            this.Base64Label.AutoSize = true;
+            this.Base64Label.Location = new System.Drawing.Point(5, 8);
+            this.Base64Label.Name = "Base64Label";
+            this.Base64Label.Size = new System.Drawing.Size(41, 12);
+            this.Base64Label.TabIndex = 2;
+            this.Base64Label.Text = "Base64";
+            // 
+            // EncodeButton
+            // 
+            this.EncodeButton.Location = new System.Drawing.Point(333, 3);
+            this.EncodeButton.Name = "EncodeButton";
+            this.EncodeButton.Size = new System.Drawing.Size(75, 23);
+            this.EncodeButton.TabIndex = 2;
+            this.EncodeButton.Text = "↓Encode↓";
+            this.EncodeButton.UseVisualStyleBackColor = true;
+            this.EncodeButton.Click += new System.EventHandler(this.EncodeButton_Click);
+            // 
+            // DecodeButton
+            // 
+            this.DecodeButton.Location = new System.Drawing.Point(437, 3);
+            this.DecodeButton.Name = "DecodeButton";
+            this.DecodeButton.Size = new System.Drawing.Size(75, 23);
+            this.DecodeButton.TabIndex = 2;
+            this.DecodeButton.Text = "↑Decode↑";
+            this.DecodeButton.UseVisualStyleBackColor = true;
+            this.DecodeButton.Click += new System.EventHandler(this.DecodeButton_Click);
+            // 
+            // PasteBase64Button
+            // 
+            this.PasteBase64Button.Location = new System.Drawing.Point(80, 3);
+            this.PasteBase64Button.Name = "PasteBase64Button";
+            this.PasteBase64Button.Size = new System.Drawing.Size(75, 23);
+            this.PasteBase64Button.TabIndex = 2;
+            this.PasteBase64Button.Text = "Paste↓";
+            this.PasteBase64Button.UseVisualStyleBackColor = true;
+            this.PasteBase64Button.Click += new System.EventHandler(this.PasteBase64Button_Click);
+            // 
+            // CopyBase64
+            // 
+            this.CopyBase64.Location = new System.Drawing.Point(161, 3);
+            this.CopyBase64.Name = "CopyBase64";
+            this.CopyBase64.Size = new System.Drawing.Size(75, 23);
+            this.CopyBase64.TabIndex = 2;
+            this.CopyBase64.Text = "Copy";
+            this.CopyBase64.UseVisualStyleBackColor = true;
+            this.CopyBase64.Click += new System.EventHandler(this.CopyBase64_Click);
             // 
             // MainForm
             // 
@@ -1177,6 +1364,7 @@
             this.Controls.Add(this.tabControl1);
             this.Name = "MainForm";
             this.Text = "MiscToolSet";
+            this.Shown += new System.EventHandler(this.MainForm_Shown);
             this.tabControl1.ResumeLayout(false);
             this.tabPage2.ResumeLayout(false);
             this.tabPage2.PerformLayout();
@@ -1216,6 +1404,15 @@
             ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
             this.splitContainer2.ResumeLayout(false);
             this.flowLayoutPanel2.ResumeLayout(false);
+            this.tabPage9.ResumeLayout(false);
+            this.splitContainer5.Panel1.ResumeLayout(false);
+            this.splitContainer5.Panel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit();
+            this.splitContainer5.ResumeLayout(false);
+            this.panel2.ResumeLayout(false);
+            this.panel2.PerformLayout();
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
             this.ResumeLayout(false);
 
         }
@@ -1306,6 +1503,21 @@
         private System.Windows.Forms.Button ConvertCodeButton;
         private System.Windows.Forms.Button CopyButton;
         private System.Windows.Forms.Button PasteCodeButton;
+        private System.Windows.Forms.TabPage tabPage9;
+        private System.Windows.Forms.SplitContainer splitContainer5;
+        private System.Windows.Forms.RichTextBox RawContentTextBox;
+        private System.Windows.Forms.ComboBox EncodingComboBox;
+        private System.Windows.Forms.Button CopyRawContentButton;
+        private System.Windows.Forms.Button PasteRawContentButton;
+        private System.Windows.Forms.Label RawContentLabel;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Panel panel2;
+        private System.Windows.Forms.RichTextBox Base64TextBox;
+        private System.Windows.Forms.Label Base64Label;
+        private System.Windows.Forms.Button PasteBase64Button;
+        private System.Windows.Forms.Button CopyBase64;
+        private System.Windows.Forms.Button EncodeButton;
+        private System.Windows.Forms.Button DecodeButton;
     }
 }
 

+ 47 - 0
MiscToolSet/MainForm.cs

@@ -31,6 +31,16 @@ namespace MiscToolSet
             InitializeComponent();
         }
 
+        private void MainForm_Shown(object sender, EventArgs e)
+        {
+            EncodingComboBox.ValueMember = "CodePage";
+            EncodingComboBox.DisplayMember = "DisplayName";
+            EncodingComboBox.DataSource = Encoding.GetEncodings();
+            EncodingComboBox.ValueMember = "CodePage";
+            EncodingComboBox.DisplayMember = "DisplayName";
+            EncodingComboBox.SelectedValue = Encoding.Default.CodePage;
+        }
+
         private void Md5HasherUpperCaseCheckBox_CheckedChanged(object sender, EventArgs e)
         {
             MD5HasherInputTextBox_TextChanged(null, null);
@@ -248,6 +258,43 @@ namespace MiscToolSet
         {
             InputCodeTextBox.Text = Clipboard.GetText();
         }
+
+        private void PasteRawContentButton_Click(object sender, EventArgs e)
+        {
+            RawContentTextBox.Text = Clipboard.GetText();
+        }
+
+        private void PasteBase64Button_Click(object sender, EventArgs e)
+        {
+            Base64TextBox.Text = Clipboard.GetText();
+        }
+
+        private void CopyRawContentButton_Click(object sender, EventArgs e)
+        {
+            Clipboard.SetText(RawContentTextBox.Text);
+        }
+
+        private void CopyBase64_Click(object sender, EventArgs e)
+        {
+            Clipboard.SetText(Base64TextBox.Text);
+        }
+
+        private void EncodeButton_Click(object sender, EventArgs e)
+        {
+            var enc = Encoding.GetEncoding((int)EncodingComboBox.SelectedValue);
+            var buf = enc.GetBytes(RawContentTextBox.Text);
+            var b64 = Convert.ToBase64String(buf, Base64FormattingOptions.None);
+            Base64TextBox.Text = b64;
+        }
+
+        private void DecodeButton_Click(object sender, EventArgs e)
+        {
+            var enc = Encoding.GetEncoding((int)EncodingComboBox.SelectedValue);
+            var b64 = Base64TextBox.Text;
+            var buf = Convert.FromBase64String(b64);
+            var raw = enc.GetString(buf);
+            RawContentTextBox.Text = raw;
+        }
     }
 
     internal static class CommonExtensionMetond