DEES encryption algorithm is implemented under C #

xiaoxiao2021-03-05  25

This procedure is divided into two parts, the first part is the main program, and the other part is the library.

In this program, INT [] represents the 2-way form of char, such as 'a' = int [8] {0, 1, 1, 0, 0, 0, 1}

The following subprogramme this program passes at C # 2005. .

#Region Using Directives

Using system.collections.gener; using system.data; using system.drawing; using system.windows.form; using system.io; #ndregion

namespace DES_2nd {partial class Form1: Form {public Form1 () {InitializeComponent ();} Func.Func F = new Func.Func (); // initialize the library private void button1_Click (object sender, EventArgs e) {char [] Tempmchar = mbox.text.tochararray (); // Original plain text int mod = TempmChar.Length% 8; // Extension Flaming is 8 multiples CHAR [] mchar = new char [TempmChar.Length (8 - MOD)]; For (int i = 0; i