Advertisement
Guest User

Digimon: ASR

a guest
Oct 31st, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. "
  2. Security:
  3. -> Checksum32 (Signed)
  4.   -> Offset: 20
  5.   -> Calculation Start: 0
  6.   -> Calculation Length: 0x185E
  7.  
  8. Additional:
  9. Before the checksum is calculated, the last checksum is overwritten with 0.
  10. "
  11.  
  12. private int CalculateSignedChecksum32(byte[] data, int offset, int size) {
  13.     int sum = 0;
  14.  
  15.     while (size-- > 0)
  16.         sum += (sbyte) data[offset++];
  17.  
  18.     return sum;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement