注册机软件/RegisterCNC/Form1.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RegisterCNC
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox2.Text == "")
            {
                MessageBox.Show("请输入正确的序列号");
                return;
            }
            textBox1.Text = GetMd5(textBox2.Text.Trim() + "TEST") +"@" +Encrypt(GetDateTime());
        }



        public string GetDateTime()
        {
            int year = Convert.ToDateTime(dateTimePicker1.Text).Year;
            int month = Convert.ToDateTime(dateTimePicker1.Text).Month;
            int day = Convert.ToDateTime(dateTimePicker1.Text).Day;
            return (year) + "D" + (month) + "D" + (day);

        }



        static string encryptKey = "Oyea";    //定义密钥 

      
        static string Encrypt(string str)
        {
            DESCryptoServiceProvider descsp = new DESCryptoServiceProvider();   //实例化加/解密类对象  

            byte[] key = Encoding.Unicode.GetBytes(encryptKey); //定义字节数组,用来存储密钥   

            byte[] data = Encoding.Unicode.GetBytes(str);//定义字节数组,用来存储要加密的字符串 

            MemoryStream MStream = new MemoryStream(); //实例化内存流对象     

            //使用内存流实例化加密流对象  
            CryptoStream CStream = new CryptoStream(MStream, descsp.CreateEncryptor(key, key), CryptoStreamMode.Write);

后面还有 44 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。