Explorar el Código

rust-protocol: Fix checksum.

Mathias Gottschlag hace 5 años
padre
commit
9aefb20f2c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      common/rust-protocol/src/lib.rs

+ 1
- 1
common/rust-protocol/src/lib.rs Ver fichero

@@ -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…
Cancelar
Guardar