MainForm.cs
(开头部分) 19KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.IO;
using System.Resources;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using RA2VXLEncryption.Forms;
namespace RA2VXLEncryption
{
public partial class MainForm : Form
{
#region 变量
private readonly ResourceManager rm;
#endregion
public MainForm()
{
this.InitializeComponent();
this.rm = new ResourceManager(typeof(RA2VXLEncryptionResource));
}
#region 函数
/// <summary>
/// 加密后文件的文件名
/// </summary>
/// <param name="fileName">含后缀的源文件名或路径</param>
/// <returns></returns>
public string EncryptFileName(string fileName)
{
string realName = Path.GetFileNameWithoutExtension(fileName);
realName = Regex.Replace(realName, "_dec$", "") + "_enc";
return realName + Path.GetExtension(fileName);
}
/// <summary>
/// 解密后文件的文件名
/// </summary>
/// <param name="fileName">含后缀的源文件名或路径</param>
/// <returns></returns>
public string DecryptFileName(string fileName)
{
string realName = Path.GetFileNameWithoutExtension(fileName);
realName = Regex.Replace(realName, "_enc$", "") + "_dec";
return realName + Path.GetExtension(fileName);
}
/// <summary>
/// 二进制密钥转为十六进制报文
/// </summary>
/// <param name="datas">二进制密钥</param>
/// <returns></returns>
public string BinArrayToHexString(byte[] datas)
{
StringBuilder builder = new StringBuilder(datas.Length * 2);
foreach (byte data in datas)
后面还有 420 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。