Substituiton

This commit is contained in:
Simon Freiermuth 2022-03-17 14:40:35 +01:00
parent 682cd6f814
commit 0851f73c88
4 changed files with 70 additions and 0 deletions

View file

@ -15,4 +15,22 @@ class SPNTest {
assertEquals(0xFFFF, spn.k(key, 1));
assertEquals(0xFFFF, spn.k(key, 2));
}
@Test
void substitution() {
var spn = new SPN();
//given
int x = 0xEF45;
int r = 0x051C;
System.out.print(Integer.toHexString(x));
//when
int y = spn.substitution(x);
// then
assertEquals(r, y);
// System.out.print(Integer.toHexString(spn.substitution(x)));
}
}