吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 495|回复: 0
收起左侧

[求助] 求助c#转易语言,谢谢!

[复制链接]
shftest 发表于 2022-11-21 12:27
25吾爱币
[C#] 纯文本查看 复制代码
	private byte[] OperationBytes(byte[] _bytes)	{
		byte[] array = new byte[4];
		byte[] array2 = new byte[_bytes.Length - 4];
		Buffer.BlockCopy(_bytes, 0, array, 0, array.Length);
		Buffer.BlockCopy(_bytes, 4, array2, 0, array2.Length);
		string newStr = Message.ByteToHex(array);
		string string_ = Message.ByteToHex(array2);
		long num = this.btnHexStrToInt_Click(newStr);
		BigInteger dividend = this.XOR(string_);
		if (num == 0L)
		{
			return null;
		}
		BigInteger num2 = dividend / num;
		return Message.strToToHexByte(this.btnIntValueToHex_Click(num2));
	}


求助C#转易语言!
不太懂C# 只能看懂点大概意思。第一次发帖,如有不妥,请管理代删帖,谢谢!
其他函数代码如下:
[C#] 纯文本查看 复制代码
	public BigInteger XOR(string string_1)
	{
		return BigInteger.Parse(string_1, NumberStyles.AllowHexSpecifier);
	}

	private long btnHexStrToInt_Click(string newStr)
	{
		return Convert.ToInt64(newStr, 16);
	}

	private string btnIntValueToHex_Click(BigInteger _num)
	{
		return _num.ToString("X2");
	}

	public static string ByteToHex(byte[] Bytes)
	{
		string text = string.Empty;
		foreach (byte b in Bytes)
		{
			text += string.Format("{0:X2}", b);
		}
		return text.Trim();
	}

	public static byte[] strToToHexByte(string hexString)
	{
		byte[] result;
		try
		{
			hexString = hexString.Replace(" ", "");
			if (hexString.Length % 2 != 0)
			{
				hexString += " ";
			}
			byte[] array = new byte[hexString.Length / 2];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
			}
			result = array;
		}
		catch
		{
			result = null;
		}
		return result;
	}


还缺什么留言,我再发。
第一次发帖,有不妥的地方,请多谅解!

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-13 20:46

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表