uds-tool/src/test/java/com/rusefi/uds/SecurityTest.java

14 lines
317 B
Java
Raw Normal View History

2023-06-02 21:10:07 -07:00
package com.rusefi.uds;
import org.junit.Test;
2023-06-02 21:49:31 -07:00
import static org.junit.Assert.assertEquals;
2023-06-02 21:10:07 -07:00
public class SecurityTest {
@Test
public void testCalcKey() {
2023-06-02 21:49:31 -07:00
int key = KeyCalculator.udsSecurityCalcKey(0x5D8A2010, 0xF0);
assertEquals("Got " + String.format("%x", key), 0xc42f15ae, key);
2023-06-02 21:10:07 -07:00
}
}