摘要: 根据上篇,如果我们通讯协议不进行加密,被人抓包后很容易解析出来,这个时候我们就需要对协议进行加密处理,协议传输本质上是传输的二进制字节流,我们可以考虑用一定的方式修改字节数据,最简单的方式是把0改成1,把1改成0,也就是直接取反,这也是一种加密方式,虽然比较容易被破解,意义不大, 我们可以考虑如下加 阅读全文
posted @ 2024-07-31 12:06 小包2017 阅读(43) 评论(0) 推荐(0)
摘要: 先明白大端模式和小端模式的区别 小端模式 int num = 3 在内存中的存储是, 00000011 00000000 00000000 00000000内存地址:低 >高 即低位字节在前,高位字节在后 大端模式 int num = 3 在内存中的存储是, 00000000 00000000 00 阅读全文
posted @ 2024-07-24 11:06 小包2017 阅读(132) 评论(0) 推荐(0)
摘要: namespace ConsoleApp5 { internal class Program { private static int index = 0; static void Main(string[] args) { Thread thread = new Thread(FuncThread 阅读全文
posted @ 2024-07-03 11:38 小包2017 阅读(33) 评论(0) 推荐(0)
摘要: 自己记录 阅读全文
posted @ 2022-05-12 16:46 小包2017 阅读(51) 评论(0) 推荐(0)
摘要: C#官方源码参考 https://referencesource.microsoft.com/ C#官方源码参考 https://github.com/Unity-Technologies/UnityCsReference unity源码 阅读全文
posted @ 2020-05-11 10:42 小包2017 阅读(490) 评论(0) 推荐(0)
摘要: class Program { delegate void MyDelegate(string str); static void Main(string[] args) { //正常调用 MyDelegate myDelegate = new MyDelegate(CW); myDelegate( 阅读全文
posted @ 2020-01-17 09:38 小包2017 阅读(123) 评论(0) 推荐(0)
摘要: 使用泛型可以定义接口,在接口中定义的方法可以带泛型参数。 《C#高级编程(第7版)》清华大学出版社 namespace Test { class Program { static void Main(string[] args) { TestClass testClass = new TestCla 阅读全文
posted @ 2020-01-13 11:06 小包2017 阅读(333) 评论(0) 推荐(0)
摘要: 1. where T : struct 对于结构约束,类型T必须是值类型 2. where T : class 对于类约束,类型T必须是引用类型 3. where T : 接口名称IFoo 对于指定接口IFoo约束,类型T必须实现指定接口IFoo 4. where T : 类名Foo 对于指定类Fo 阅读全文
posted @ 2020-01-13 10:47 小包2017 阅读(355) 评论(0) 推荐(0)
摘要: Linux 命令 ls 查看当前文件夹下所有文件 Linux 命令 Tab 自动补全命令 阅读全文
posted @ 2019-12-10 11:55 小包2017 阅读(108) 评论(0) 推荐(0)
摘要: C#获取程序路径 string path1 = AppDomain.CurrentDomain.BaseDirectory; string path2 = Environment.CurrentDirectory; Console.WriteLine(path1); Console.WriteLin 阅读全文
posted @ 2019-05-16 15:53 小包2017 阅读(114) 评论(0) 推荐(0)