Browse Source

rust-protocol: Fix checksum.

Mathias Gottschlag 5 years ago
parent
commit
9aefb20f2c
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      common/rust-protocol/src/lib.rs

+ 1
- 1
common/rust-protocol/src/lib.rs View File

@@ -35,7 +35,7 @@ impl Packet {
35 35
         if !self.encode(&mut data[8..30]) {
36 36
             return false;
37 37
         }
38
-        let checksum = State::<KERMIT>::calculate(&data[0..30]);
38
+        let checksum = State::<KERMIT>::calculate(&data[8..30]);
39 39
         data[30..].copy_from_slice(&checksum.to_le_bytes());
40 40
         encrypt_cbc(key, data);
41 41
         true

Loading…
Cancel
Save