初始化提交

仓库转移到Gitea,初始化提交,可能丢失以前的git版本日志
This commit is contained in:
2025-11-27 16:41:05 +08:00
commit 027d0f8024
663 changed files with 171319 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
Public Class CheckSum
''' <summary>
''' 获取数据包的和校验
''' </summary>
''' <param name="packet">数据包的内容</param>
''' <returns></returns>
Public Shared Function GetPacketCheck(packet() As Byte) As Byte
Dim result As Integer
'当packet的相加综合超过INT_MAX则会异常
For Each b As Byte In packet
result += b
Next
Return CByte(&HFF - (result And &HFF))
End Function
End Class