H hanyelmehy Active Member Licensed User Longtime User Oct 17, 2021 #1 any idea hot to get CheckSum8 Modulo 256 same result in this link from Hex Input or ASCII Input https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/
any idea hot to get CheckSum8 Modulo 256 same result in this link from Hex Input or ASCII Input https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2021 #2 B4X: Private Sub SumOfBytesMod256(Input As String) As String Dim x As Int For i = 0 To Input.Length - 1 x = x + Asc(Input.CharAt(i)) Next Return Bit.ToHexString(x Mod 256).ToUpperCase End Sub Upvote 0
B4X: Private Sub SumOfBytesMod256(Input As String) As String Dim x As Int For i = 0 To Input.Length - 1 x = x + Asc(Input.CharAt(i)) Next Return Bit.ToHexString(x Mod 256).ToUpperCase End Sub